]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: 6lowpan: Fix handling of uncompressed IPv6 packets
authorLukasz Duda <lukasz.duda@nordicsemi.no>
Wed, 13 Jan 2016 15:57:48 +0000 (16:57 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 23 Jan 2016 12:25:53 +0000 (12:25 +0000)
commitcb0978990e61ce36c764a61fdec6e880087f6659
treecec0bee9047e0a1c71c5c04bb43f97efe080bc01
parent1ddc07c8939839c8f94dc61a1c1e61be2a15c45a
Bluetooth: 6lowpan: Fix handling of uncompressed IPv6 packets

This patch fixes incorrect handling of the 6lowpan packets that contain
uncompressed IPv6 header.

RFC4944 specifies a special dispatch for 6lowpan to carry uncompressed
IPv6 header. This dispatch (1 byte long) has to be removed during
reception and skb data pointer has to be moved. To correctly point in
the beginning of the IPv6 header the dispatch byte has to be pulled off
before packet can be processed by netif_rx_in().

Test scenario: IPv6 packets are not correctly interpreted by the network
layer when IPv6 header is not compressed (e.g. ICMPv6 Echo Reply is not
propagated correctly to the ICMPv6 layer because the extra byte will make
the header look corrupted).

Similar approach is done for IEEE 802.15.4.

Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
Signed-off-by: Glenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Cc: stable@vger.kernel.org # 4.4+
net/bluetooth/6lowpan.c