diff --git a/sys/include/net/gnrc/sixlowpan/nd/router.h b/sys/include/net/gnrc/sixlowpan/nd/router.h index f1aee19406..8971f40803 100644 --- a/sys/include/net/gnrc/sixlowpan/nd/router.h +++ b/sys/include/net/gnrc/sixlowpan/nd/router.h @@ -70,7 +70,8 @@ typedef struct { uint16_t ltime; /**< the time in minutes until deletion */ BITFIELD(ctxs, GNRC_SIXLOWPAN_CTX_SIZE);/**< contexts associated with BR */ gnrc_sixlowpan_nd_router_prf_t *prfs; /**< prefixes associated with BR */ - vtimer_t ltimer; /**< timer for deletion */ + xtimer_t ltimer; /**< timer for deletion */ + msg_t ltimer_msg; /**< msg_t for gnrc_sixlowpan_nd_router_abr_t::ltimer */ } gnrc_sixlowpan_nd_router_abr_t; /** diff --git a/sys/net/gnrc/network_layer/sixlowpan/nd/router/gnrc_sixlowpan_nd_router.c b/sys/net/gnrc/network_layer/sixlowpan/nd/router/gnrc_sixlowpan_nd_router.c index 060863548a..a20a49b8e9 100644 --- a/sys/net/gnrc/network_layer/sixlowpan/nd/router/gnrc_sixlowpan_nd_router.c +++ b/sys/net/gnrc/network_layer/sixlowpan/nd/router/gnrc_sixlowpan_nd_router.c @@ -241,8 +241,10 @@ void gnrc_sixlowpan_nd_opt_abr_handle(kernel_pid_t iface, ndp_rtr_adv_t *rtr_adv t.seconds = abr->ltime * 60; - vtimer_set_msg(&abr->ltimer, t, gnrc_ipv6_pid, - GNRC_SIXLOWPAN_ND_MSG_ABR_TIMEOUT, abr); + xtimer_remove(&abr->ltimer); + abr->ltimer_msg.type = GNRC_SIXLOWPAN_ND_MSG_ABR_TIMEOUT; + abr->ltimer_msg.content.ptr = (char *) abr; + xtimer_set_msg(&abr->ltimer, (uint32_t) timex_uint64(t), &abr->ltimer_msg, gnrc_ipv6_pid); } gnrc_pktsnip_t *gnrc_sixlowpan_nd_opt_6ctx_build(uint8_t prefix_len, uint8_t flags, uint16_t ltime,