From c9c83c7dc7a970ae342d0a461c9e8f9e19fca5a9 Mon Sep 17 00:00:00 2001 From: Yonezawa-T2 <Yonezawa-T2@mail.dnp.co.jp> Date: Tue, 8 Dec 2015 19:24:35 +0900 Subject: [PATCH] nc: cancel timer set by `gnrc_ndp_rtr_sol_handle` in `gnrc_ipv6_nc_remove`. --- sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c b/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c index 590c346164..8357b9924b 100644 --- a/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c +++ b/sys/net/gnrc/network_layer/ipv6/nc/gnrc_ipv6_nc.c @@ -163,6 +163,13 @@ void gnrc_ipv6_nc_remove(kernel_pid_t iface, const ipv6_addr_t *ipv6_addr) #endif #ifdef MODULE_GNRC_SIXLOWPAN_ND_ROUTER xtimer_remove(&entry->type_timeout); + + gnrc_ipv6_netif_t *if_entry = gnrc_ipv6_netif_get(iface); + + if ((if_entry != NULL) && (if_entry->rtr_adv_msg.content.ptr == (char *) entry)) { + /* cancel timer set by gnrc_ndp_rtr_sol_handle */ + xtimer_remove(&if_entry->rtr_adv_timer); + } #endif #if defined(MODULE_GNRC_NDP_ROUTER) || defined(MODULE_GNRC_SIXLOWPAN_ND_BORDER_ROUTER) xtimer_remove(&entry->rtr_adv_timer); -- GitLab