linux/net/ieee802154
Jukka Rissanen 1188f05497 6lowpan: Uncompression of traffic class field was incorrect
If priority/traffic class field in IPv6 header is set (seen when
using ssh), the uncompression sets the TC and Flow fields incorrectly.

Example:

This is IPv6 header of a sent packet. Note the priority/TC (=1) in
the first byte.

00000000: 61 00 00 00 00 2c 06 40 fe 80 00 00 00 00 00 00
00000010: 02 02 72 ff fe c6 42 10 fe 80 00 00 00 00 00 00
00000020: 02 1e ab ff fe 4c 52 57

This gets compressed like this in the sending side

00000000: 72 31 04 06 02 1e ab ff fe 4c 52 57 ec c2 00 16
00000010: aa 2d fe 92 86 4e be c6 ....

In the receiving end, the packet gets uncompressed to this
IPv6 header

00000000: 60 06 06 02 00 2a 1e 40 fe 80 00 00 00 00 00 00
00000010: 02 02 72 ff fe c6 42 10 fe 80 00 00 00 00 00 00
00000020: ab ff fe 4c 52 57 ec c2

First four bytes are set incorrectly and we have also lost
two bytes from destination address.

The fix is to switch the case values in switch statement
when checking the TC field.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-15 03:11:06 -05:00
..
6lowpan.c 6lowpan: Uncompression of traffic class field was incorrect 2013-11-15 03:11:06 -05:00
6lowpan.h 6lowpan: lowpan_uncompress_addr with address_mode 2013-08-20 13:23:12 -07:00
af802154.h
af_ieee802154.c ieee802154: free skb buffer if dev isn't running 2011-06-30 16:18:09 +04:00
dgram.c ieee802154/dgram: Pass source address in dgram_recvmsg 2013-03-27 00:52:06 -04:00
ieee802154.h ieee802154: use genl_register_family_with_ops() 2013-11-14 17:10:40 -05:00
Kconfig net/ieee802154: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:40:00 -08:00
Makefile IEEE802.15.4: 6LoWPAN basic support 2011-08-24 19:36:06 -07:00
netlink.c genetlink: make all genl_ops users const 2013-11-14 17:10:41 -05:00
nl_policy.c ieee802154: add LIST_PHY command support 2009-11-06 14:31:22 +03:00
nl-mac.c ieee802154: use genl_register_family_with_ops() 2013-11-14 17:10:40 -05:00
nl-phy.c ieee802154: use genl_register_family_with_ops() 2013-11-14 17:10:40 -05:00
raw.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
wpan-class.c net: ieee802154: convert class code to use dev_groups 2013-07-26 18:05:18 -07:00