Skip to content

Commit

Permalink
gnrc/ipv6: Store all SLAAC prefixes
Browse files Browse the repository at this point in the history
Incl. off-link ones, since lifetimes for the auto configured addresses are managed by the prefix entry.
  • Loading branch information
xnumad committed Jun 21, 2024
1 parent 0ebb657 commit 5624545
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion sys/net/gnrc/network_layer/ipv6/nib/nib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,7 +1643,7 @@ static uint32_t _handle_pio(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
if (pio->flags & NDP_OPT_PI_FLAGS_A) {
_auto_configure_addr(netif, &pio->prefix, pio->prefix_len);
}
if ((pio->flags & NDP_OPT_PI_FLAGS_L) || _multihop_p6c(netif, abr)) {
if ((pio->flags & NDP_OPT_PI_FLAGS_L) || _multihop_p6c(netif, abr) || (pio->flags & NDP_OPT_PI_FLAGS_A)) {

Check warning on line 1646 in sys/net/gnrc/network_layer/ipv6/nib/nib.c

View workflow job for this annotation

GitHub Actions / static-tests

line is longer than 100 characters
_nib_offl_entry_t *pfx;

if (pio->valid_ltime.u32 == 0) {
Expand Down
2 changes: 0 additions & 2 deletions tests/net/gnrc_ipv6_nib/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,6 @@ static void test_handle_pkt__rtr_adv__success(uint8_t rtr_adv_flags,
TEST_ASSERT_EQUAL_INT(exp_addr_count,
_netif_addr_count(_mock_netif));
}
TEST_ASSERT_MESSAGE(!gnrc_ipv6_nib_pl_iter(0, &state, &prefix),
"There is an unexpected prefix list entry");
}
TEST_ASSERT_EQUAL_INT(0, msg_avail());
}
Expand Down

0 comments on commit 5624545

Please sign in to comment.