]> git.baikalelectronics.ru Git - kernel.git/commit
6lowpan_rtnl: fix fragmentation with two fragments
authorAlexander Aring <alex.aring@gmail.com>
Mon, 2 Jun 2014 11:21:57 +0000 (13:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Jun 2014 17:39:42 +0000 (10:39 -0700)
commita715cedaebe40c4d871f3f1060cc8e599fbd552f
tree08ea7ae9257bef3c14ff29163a07de3c5c00b2d0
parentc0f46807e59b3b25d21eaff927d4fad6d2a14ba8
6lowpan_rtnl: fix fragmentation with two fragments

This patch fix the 6LoWPAN fragmentation for the case if we have exactly
two fragments. The problem is that the (skb_unprocessed >= frag_cap)
condition is always false on the second fragment after sending the first
fragment. A fragmentation with only one fragment doesn't make any sense.
The solution is that we use a do while loop here, that ensures we sending
always a minimum of two fragments if we need a fragmentation.

This issue was introduced by commit 87c96229bf437c70dbaedc1b8b8805a2997f930c
("6lowpan: fix fragmentation").

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ieee802154/6lowpan_rtnl.c