Skip to content

Commit

Permalink
Stop advertisment RPL prefix if we not have a address and it is not '…
Browse files Browse the repository at this point in the history
…A-flag'

Change-Id: I690de0a0e5ba54fcb24094ca051c901cdff2d0b1
  • Loading branch information
Juha Heiskanen committed Jun 20, 2019
1 parent d37ce6a commit 6a44829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/RPL/rpl_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ void rpl_control_transmit_dio(rpl_domain_t *domain, protocol_interface_info_entr
} else {
prefix->options &= ~ PIO_R;

if (rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && prefix->lifetime != 0) {
if (rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && (prefix->lifetime != 0 || !(prefix->options & PIO_A))) {
continue;
}
}
Expand Down Expand Up @@ -1163,7 +1163,7 @@ void rpl_control_transmit_dio(rpl_domain_t *domain, protocol_interface_info_entr
ns_list_foreach_safe(prefix_entry_t, prefix, prefixes) {
/* See equivalent checks in length calculation above */
if ((prefix->options & (PIO_L | RPL_PIO_PUBLISHED)) == PIO_L ||
(!(prefix->options & PIO_R) && rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && prefix->lifetime != 0)) {
(!(prefix->options & PIO_R) && rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && (prefix->lifetime != 0 || !(prefix->options & PIO_A)))) {
continue;
}

Expand Down

0 comments on commit 6a44829

Please sign in to comment.