Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ieee802154: 6lowpan: ensure of sending 1280 packets

This patch changes the 1281 MTU to 1280. Others stack have only a 1280
byte array for uncompressed 6LoWPAN packets, this avoid that these
stacks have an overflow. Sending 1281 uncompressed 6LoWPAN packets isn't
also rfc complaint.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

authored by

Alexander Aring and committed by
Marcel Holtmann
685d6328 6e361d6f

+1 -1
+1 -1
net/ieee802154/6lowpan_rtnl.c
··· 437 437 /* Frame Control + Sequence Number + Address fields + Security Header */ 438 438 dev->hard_header_len = 2 + 1 + 20 + 14; 439 439 dev->needed_tailroom = 2; /* FCS */ 440 - dev->mtu = 1281; 440 + dev->mtu = IPV6_MIN_MTU; 441 441 dev->tx_queue_len = 0; 442 442 dev->flags = IFF_BROADCAST | IFF_MULTICAST; 443 443 dev->watchdog_timeo = 0;