From ecfff3e8123ac21e6532e917d4a8ab18043d17b3 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 17 Jul 2018 12:13:54 +0200 Subject: [PATCH] sixlowpan: fix decoding of DAM in sixlowpan_print() Destination address compression is all in the least significant nibble of that byte in the IPHC header [[1]]. [1]: https://tools.ietf.org/html/rfc6282#section-3.1.1 --- sys/net/network_layer/sixlowpan/sixlowpan_print.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/net/network_layer/sixlowpan/sixlowpan_print.c b/sys/net/network_layer/sixlowpan/sixlowpan_print.c index fc048af39e..306f0db9af 100644 --- a/sys/net/network_layer/sixlowpan/sixlowpan_print.c +++ b/sys/net/network_layer/sixlowpan/sixlowpan_print.c @@ -201,15 +201,15 @@ void sixlowpan_print(uint8_t *data, size_t size) puts("reserved"); break; - case 0x10: + case 0x01: puts("64 bits inline"); break; - case 0x20: + case 0x02: puts("16 bits inline"); break; - case 0x30: + case 0x03: puts("elided (use L2 address)"); break; } @@ -222,15 +222,15 @@ void sixlowpan_print(uint8_t *data, size_t size) puts("128 bits inline"); break; - case 0x10: + case 0x01: puts("64 bits inline"); break; - case 0x20: + case 0x02: puts("16 bits inline"); break; - case 0x30: + case 0x03: puts("elided (use L2 address)"); break; }