Merge pull request #16734 from benpicco/_handle_rio-ltime

gnrc_ipv6_nib: handle route information option with ltime = 0
This commit is contained in:
benpicco 2021-08-24 10:20:02 +02:00 committed by GitHub
commit 3d0e5509dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1633,8 +1633,12 @@ static uint32_t _handle_rio(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
(UINT32_MAX - 1) : route_ltime * MS_PER_SEC;
}
gnrc_ipv6_nib_ft_add(&rio->prefix, rio->prefix_len, &ipv6->src,
netif->pid, route_ltime);
if (route_ltime == 0) {
gnrc_ipv6_nib_ft_del(&rio->prefix, rio->prefix_len);
} else {
gnrc_ipv6_nib_ft_add(&rio->prefix, rio->prefix_len, &ipv6->src,
netif->pid, route_ltime);
}
return route_ltime;
}