Skip to content

Commit

Permalink
[IrDA]: Incorrect TTP header reservation
Browse files Browse the repository at this point in the history
We must reserve SAR + MAX_HEADER bytes for IrLMP to fit in.

Patch from Jeet Chaudhuri <jeetlinux@yahoo.co.in>

Signed-off-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jeet Chaudhuri authored and David S. Miller committed Dec 7, 2006
1 parent b259e7d commit e694ba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/irda/irttp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
return -ENOMEM;

/* Reserve space for MUX_CONTROL and LAP header */
skb_reserve(tx_skb, TTP_MAX_HEADER);
skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*
Expand Down Expand Up @@ -1349,7 +1349,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
return -ENOMEM;

/* Reserve space for MUX_CONTROL and LAP header */
skb_reserve(tx_skb, TTP_MAX_HEADER);
skb_reserve(tx_skb, TTP_MAX_HEADER + TTP_SAR_HEADER);
} else {
tx_skb = userdata;
/*
Expand Down

0 comments on commit e694ba4

Please sign in to comment.