1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_ndp: check nc_entry before using it

This commit is contained in:
Cenk Gündoğan 2016-05-17 09:52:16 +02:00
parent b986ac33e8
commit 1791ef5581

View File

@ -460,8 +460,10 @@ void gnrc_ndp_rtr_sol_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt,
/* XXX: can't just use GNRC_NETAPI_MSG_TYPE_SND, since the next retransmission
* must also be set. */
nc_entry = gnrc_ipv6_nc_get(iface, &ipv6->src);
xtimer_set_msg(&nc_entry->rtr_adv_timer, delay, &nc_entry->rtr_adv_msg,
gnrc_ipv6_pid);
if (nc_entry) {
xtimer_set_msg(&nc_entry->rtr_adv_timer, delay, &nc_entry->rtr_adv_msg,
gnrc_ipv6_pid);
}
}
#endif
}