Skip to content
Snippets Groups Projects
Unverified Commit 2687e87e authored by Cenk Gündoğan's avatar Cenk Gündoğan Committed by GitHub
Browse files

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

gnrc_rpl: remove route before updating it
parents 48d17e68 3d821ee1
No related branches found
No related tags found
No related merge requests found
...@@ -467,6 +467,7 @@ bool _parse_options(int msg_type, gnrc_rpl_instance_t *inst, gnrc_rpl_opt_t *opt ...@@ -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)), ipv6_addr_to_str(addr_str, &(target->target), (unsigned)sizeof(addr_str)),
target->prefix_length); target->prefix_length);
gnrc_ipv6_nib_ft_del(&(target->target), target->prefix_length);
gnrc_ipv6_nib_ft_add(&(target->target), target->prefix_length, src, gnrc_ipv6_nib_ft_add(&(target->target), target->prefix_length, src,
dodag->iface, dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit); 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 ...@@ -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)), ipv6_addr_to_str(addr_str, &(first_target->target), sizeof(addr_str)),
first_target->prefix_length); first_target->prefix_length);
gnrc_ipv6_nib_ft_del(&(first_target->target),
first_target->prefix_length);
gnrc_ipv6_nib_ft_add(&(first_target->target), gnrc_ipv6_nib_ft_add(&(first_target->target),
first_target->prefix_length, src, first_target->prefix_length, src,
dodag->iface, dodag->iface,
......
...@@ -258,6 +258,7 @@ void gnrc_rpl_parent_update(gnrc_rpl_dodag_t *dodag, gnrc_rpl_parent_t *parent) ...@@ -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) { if (dodag->instance->mop != GNRC_RPL_P2P_MOP) {
#endif #endif
if (parent == dodag->parents) { if (parent == dodag->parents) {
gnrc_ipv6_nib_ft_del(NULL, 0);
gnrc_ipv6_nib_ft_add(NULL, 0, &parent->addr, dodag->iface, gnrc_ipv6_nib_ft_add(NULL, 0, &parent->addr, dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit); 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 ...@@ -308,6 +309,7 @@ static gnrc_rpl_parent_t *_gnrc_rpl_find_preferred_parent(gnrc_rpl_dodag_t *doda
#ifdef MODULE_GNRC_RPL_P2P #ifdef MODULE_GNRC_RPL_P2P
if (dodag->instance->mop != GNRC_RPL_P2P_MOP) { if (dodag->instance->mop != GNRC_RPL_P2P_MOP) {
#endif #endif
gnrc_ipv6_nib_ft_del(NULL, 0);
gnrc_ipv6_nib_ft_add(NULL, 0, &dodag->parents->addr, dodag->iface, gnrc_ipv6_nib_ft_add(NULL, 0, &dodag->parents->addr, dodag->iface,
dodag->default_lifetime * dodag->lifetime_unit); dodag->default_lifetime * dodag->lifetime_unit);
#ifdef MODULE_GNRC_RPL_P2P #ifdef MODULE_GNRC_RPL_P2P
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment