1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20757 from xnumad/offl-lifetimes

gnrc/ipv6: Store all SLAAC prefixes
This commit is contained in:
benpicco 2024-07-29 14:06:22 +00:00 committed by GitHub
commit 9781bc0ad3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -1643,7 +1643,8 @@ 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_A | NDP_OPT_PI_FLAGS_L))
|| _multihop_p6c(netif, abr)) {
_nib_offl_entry_t *pfx;
if (pio->valid_ltime.u32 == 0) {

View File

@ -1180,7 +1180,7 @@ static void test_handle_pkt__rtr_adv__success(uint8_t rtr_adv_flags,
"Address was configured by PIO, "
"but A flag was set");
}
if (pio_flags & NDP_OPT_PI_FLAGS_L) {
if (pio_flags & (NDP_OPT_PI_FLAGS_A | NDP_OPT_PI_FLAGS_L)) {
TEST_ASSERT_MESSAGE(gnrc_ipv6_nib_pl_iter(0, &state, &prefix),
"No prefix list entry found");
TEST_ASSERT_MESSAGE(ipv6_addr_match_prefix(&_loc_gb,
@ -1192,7 +1192,7 @@ static void test_handle_pkt__rtr_adv__success(uint8_t rtr_adv_flags,
TEST_ASSERT((_PIO_PFX_LTIME / MS_PER_SEC) < prefix.pref_until);
}
}
if (!pio || !(pio_flags & NDP_OPT_PI_FLAGS_L)) {
if (!pio || !(pio_flags & (NDP_OPT_PI_FLAGS_A | NDP_OPT_PI_FLAGS_L))) {
if (!pio) {
TEST_ASSERT_EQUAL_INT(exp_addr_count,
_netif_addr_count(_mock_netif));