diff options
author | David S. Miller <davem@davemloft.net> | 2014-06-02 10:39:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-02 10:39:52 -0700 |
commit | 3e820811583e7c7f8d7793775d82898e5136a855 (patch) | |
tree | e4ac32d38c2a2167a838e62b2bbe75e48d510753 | |
parent | 86c92ee3a2a22bf87537072f0f2021089ab87395 (diff) | |
parent | eb06481d69c60f6f9318e935053dce13fe3e8951 (diff) | |
download | linux-3e820811583e7c7f8d7793775d82898e5136a855.tar.gz linux-3e820811583e7c7f8d7793775d82898e5136a855.tar.bz2 linux-3e820811583e7c7f8d7793775d82898e5136a855.zip |
Merge branch '6lowpan-next'
Alexander Aring says:
====================
6lowpan: fragmentation fixes
This patch series fix the 6LoWPAN fragmentation which are in two cases broken.
The first case is if we have exactly two 6LoWPAN fragments only. This is fixed
by patch "6lowpan_rtnl: fix fragmentation with two fragments".
The second case is a off by one issue if we have payload which hits the fragment
boundary.
Both issues are introduced by commit d4b2816d67d6e07b2f27037f282d8db03a5829d7
("6lowpan: fix fragmentation").
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ieee802154/6lowpan_rtnl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c index 1ae8a5628fb5..fe6bd7a71081 100644 --- a/net/ieee802154/6lowpan_rtnl.c +++ b/net/ieee802154/6lowpan_rtnl.c @@ -312,7 +312,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev, frag_hdr[0] |= LOWPAN_DISPATCH_FRAGN; frag_cap = round_down(payload_cap - LOWPAN_FRAGN_HEAD_SIZE, 8); - while (skb_unprocessed >= frag_cap) { + do { dgram_offset += frag_len; skb_offset += frag_len; skb_unprocessed -= frag_len; @@ -328,7 +328,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev, __func__, frag_tag, skb_offset); goto err; } - } + } while (skb_unprocessed > frag_cap); consume_skb(skb); return NET_XMIT_SUCCESS; |