Skip to content

Commit 6a44829

Browse files
author
Juha Heiskanen
committed
Stop advertisment RPL prefix if we not have a address and it is not 'A-flag'
Change-Id: I690de0a0e5ba54fcb24094ca051c901cdff2d0b1
1 parent d37ce6a commit 6a44829

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/RPL/rpl_control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,7 @@ void rpl_control_transmit_dio(rpl_domain_t *domain, protocol_interface_info_entr
11251125
} else {
11261126
prefix->options &= ~ PIO_R;
11271127

1128-
if (rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && prefix->lifetime != 0) {
1128+
if (rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && (prefix->lifetime != 0 || !(prefix->options & PIO_A))) {
11291129
continue;
11301130
}
11311131
}
@@ -1163,7 +1163,7 @@ void rpl_control_transmit_dio(rpl_domain_t *domain, protocol_interface_info_entr
11631163
ns_list_foreach_safe(prefix_entry_t, prefix, prefixes) {
11641164
/* See equivalent checks in length calculation above */
11651165
if ((prefix->options & (PIO_L | RPL_PIO_PUBLISHED)) == PIO_L ||
1166-
(!(prefix->options & PIO_R) && rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && prefix->lifetime != 0)) {
1166+
(!(prefix->options & PIO_R) && rpl_dodag_mop(dodag) == RPL_MODE_NON_STORING && (prefix->lifetime != 0 || !(prefix->options & PIO_A)))) {
11671167
continue;
11681168
}
11691169

0 commit comments

Comments
 (0)