Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203844
b: refs/heads/master
c: 2600008
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent d5fb0c6 commit 0d75149
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45d65c46acc39945219eeb3752367ee80ed82799
refs/heads/master: 260000896750690b774d4343294ae5cbff1423e5
22 changes: 11 additions & 11 deletions trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -4166,25 +4166,25 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
skb_pull(skb, 2);
len = skb->len;

/*
* We can just drop the corrupted I-frame here.
* Receiver will miss it and start proper recovery
* procedures and ask retransmission.
*/
if (l2cap_check_fcs(pi, skb))
goto drop;

if (__is_sar_start(control) && __is_iframe(control))
len -= 2;

if (pi->fcs == L2CAP_FCS_CRC16)
len -= 2;

/*
* We can just drop the corrupted I-frame here.
* Receiver will miss it and start proper recovery
* procedures and ask retransmission.
*/
if (len > pi->mps) {
l2cap_send_disconn_req(pi->conn, sk);
goto drop;
}

if (l2cap_check_fcs(pi, skb))
goto drop;

req_seq = __get_reqseq(control);
req_seq_offset = (req_seq - pi->expected_ack_seq) % 64;
if (req_seq_offset < 0)
Expand Down Expand Up @@ -4224,6 +4224,9 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
skb_pull(skb, 2);
len = skb->len;

if (l2cap_check_fcs(pi, skb))
goto drop;

if (__is_sar_start(control))
len -= 2;

Expand All @@ -4233,9 +4236,6 @@ static inline int l2cap_data_channel(struct l2cap_conn *conn, u16 cid, struct sk
if (len > pi->mps || len < 0 || __is_sframe(control))
goto drop;

if (l2cap_check_fcs(pi, skb))
goto drop;

tx_seq = __get_txseq(control);

if (pi->expected_tx_seq == tx_seq)
Expand Down

0 comments on commit 0d75149

Please sign in to comment.