Skip to content

Commit

Permalink
Fixed Pan informatio IE read bug
Browse files Browse the repository at this point in the history
Use Parent BS and use RPL flag read was not done proberly.
  • Loading branch information
Juha Heiskanen committed Sep 19, 2018
1 parent bb1aeac commit a27076f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/6LoWPAN/ws/ws_ie_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a27076f

Please sign in to comment.