1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 22:13:52 +01:00

Merge pull request #9073 from miri64/gnrc_rpl/fix/ft-del

gnrc_rpl: remove route before updating it
This commit is contained in:
Cenk Gündoğan 2018-05-04 18:00:05 +02:00 committed by GitHub
commit 2687e87e0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -467,6 +467,7 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt
ipv6_addr_to_str(addr_str, &(target->target), (unsigned)sizeof(addr_str)),
target->prefix_length);
gnrc_ipv6_nib_ft_del(&(target->target), target->prefix_length);
gnrc_ipv6_nib_ft_add(&(target->target), target->prefix_length, src,
dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit);
@ -487,6 +488,8 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt
ipv6_addr_to_str(addr_str, &(first_target->target), sizeof(addr_str)),
first_target->prefix_length);
gnrc_ipv6_nib_ft_del(&(first_target->target),
first_target->prefix_length);
gnrc_ipv6_nib_ft_add(&(first_target->target),
first_target->prefix_length, src,
dodag->iface,

View File

@ -258,6 +258,7 @@ void gnrc_rpl_parent_update(gnrc_rpl_dodag_t *dodag, gnrc_rpl_parent_t *parent)
if (dodag->instance->mop != GNRC_RPL_P2P_MOP) {
#endif
if (parent == dodag->parents) {
gnrc_ipv6_nib_ft_del(NULL, 0);
gnrc_ipv6_nib_ft_add(NULL, 0, &parent->addr, dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit);
}
@ -308,6 +309,7 @@ static gnrc_rpl_parent_t *_gnrc_rpl_find_preferred_parent(gnrc_rpl_dodag_t *doda
#ifdef MODULE_GNRC_RPL_P2P
if (dodag->instance->mop != GNRC_RPL_P2P_MOP) {
#endif
gnrc_ipv6_nib_ft_del(NULL, 0);
gnrc_ipv6_nib_ft_add(NULL, 0, &dodag->parents->addr, dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit);
#ifdef MODULE_GNRC_RPL_P2P