1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 23:11:19 +01:00

gnrc_ipv6_nib: handle route information option with ltime = 0

This commit is contained in:
Benjamin Valentin 2021-08-13 21:30:31 +02:00
parent 1fd645ebcd
commit 0ead10e79a

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;
}