Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb06481d authored by Alexander Aring's avatar Alexander Aring Committed by David S. Miller
Browse files

6lowpan_rtnl: fix off by one while fragmentation



This patch fix a off by one error while fragmentation. If the frag_cap
value is equal to skb_unprocessed value we need to stop the
fragmentation loop because the last fragment which has a size of
skb_unprocessed fits into the frag capability size.

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>
parent 51263fff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	} while (skb_unprocessed > frag_cap);

	consume_skb(skb);
	return NET_XMIT_SUCCESS;