From a27076f70ba3a3fc2c85932bf140745786eee409 Mon Sep 17 00:00:00 2001 From: Juha Heiskanen Date: Tue, 18 Sep 2018 09:48:58 +0300 Subject: [PATCH] Fixed Pan informatio IE read bug Use Parent BS and use RPL flag read was not done proberly. --- source/6LoWPAN/ws/ws_ie_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/6LoWPAN/ws/ws_ie_lib.c b/source/6LoWPAN/ws/ws_ie_lib.c index e4f3da9c103..890b6f175f6 100644 --- a/source/6LoWPAN/ws/ws_ie_lib.c +++ b/source/6LoWPAN/ws/ws_ie_lib.c @@ -485,8 +485,8 @@ bool ws_wp_nested_pan_read(uint8_t *data, uint16_t length, struct ws_pan_informa pan_congiguration->pan_size = common_read_16_bit_inverse(nested_payload_ie.content_ptr); pan_congiguration->routing_cost = common_read_16_bit_inverse(nested_payload_ie.content_ptr + 2); - pan_congiguration->use_parent_bs = (nested_payload_ie.content_ptr[4] & 0x10) == 0x10; - pan_congiguration->rpl_routing_method = (nested_payload_ie.content_ptr[4] & 0x20) == 0x20; + pan_congiguration->use_parent_bs = (nested_payload_ie.content_ptr[4] & 0x01) == 0x01; + pan_congiguration->rpl_routing_method = (nested_payload_ie.content_ptr[4] & 0x02) == 0x02; pan_congiguration->version = (nested_payload_ie.content_ptr[4]& 0xe0) >> 5; return true;