提交 3e820811 编写于 作者: D David S. Miller

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 d4b2816d
("6lowpan: fix fragmentation").
====================
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
...@@ -312,7 +312,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev, ...@@ -312,7 +312,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev,
frag_hdr[0] |= LOWPAN_DISPATCH_FRAGN; frag_hdr[0] |= LOWPAN_DISPATCH_FRAGN;
frag_cap = round_down(payload_cap - LOWPAN_FRAGN_HEAD_SIZE, 8); frag_cap = round_down(payload_cap - LOWPAN_FRAGN_HEAD_SIZE, 8);
while (skb_unprocessed >= frag_cap) { do {
dgram_offset += frag_len; dgram_offset += frag_len;
skb_offset += frag_len; skb_offset += frag_len;
skb_unprocessed -= frag_len; skb_unprocessed -= frag_len;
...@@ -328,7 +328,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev, ...@@ -328,7 +328,7 @@ lowpan_xmit_fragmented(struct sk_buff *skb, struct net_device *dev,
__func__, frag_tag, skb_offset); __func__, frag_tag, skb_offset);
goto err; goto err;
} }
} } while (skb_unprocessed > frag_cap);
consume_skb(skb); consume_skb(skb);
return NET_XMIT_SUCCESS; return NET_XMIT_SUCCESS;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册