• Alexander Aring's avatar
    6lowpan_rtnl: fix fragmentation with two fragments · 51263fff
    Alexander Aring authored
    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 d4b2816d
    ("6lowpan: fix fragmentation").
    Signed-off-by: default avatarAlexander Aring <alex.aring@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    51263fff
6lowpan_rtnl.c 17.5 KB