mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
5cb904b57e
When `gnrc_ndp_node_next_hop_l2addr` cannot resolve L2 address, it creates a temporary neighbor cache entry with interface `KERNEL_PID_UNDEF` (unless the interface is already known) to send a neighbor solicitation. When another packet directed to the same address is going to sent before receiving a neighbor advertisement, `gnrc_sixlowpan_nd_next_hop_l2addr` gets the temporary neighbor cache entry and calls `gnrc_ipv6_netif_get` with `KERNEL_PID_UNDEF`, resulting get a `NULL`. We must check `NULL` before dereference it. FYI, both `gnrc_ndp_node_next_hop_l2addr` and `gnrc_sixlowpan_nd_next_hop_l2addr` are enabled when `gnrc_sixlowpan_border_router_default` module is enabled with `GNRC_NETIF_NUMOF` is greater than 1: gnrc_sixlowpan_border_router_default → gnrc_ipv6_router_default → gnrc_ndp_router (if GNRC_NETIF_NUMOF > 1) → gnrc_ndp_node → gnrc_ndp_node_next_hop_l2addr is called from _next_hop_l2addr gnrc_sixlowpan_border_router_default → gnrc_sixlowpan_nd_border_router → gnrc_sixlowpan_nd_router → gnrc_sixlowpan_nd → gnrc_sixlowpan_nd_next_hop_l2addr is called from _next_hop_l2addr |
||
---|---|---|
.. | ||
router | ||
gnrc_sixlowpan_nd.c | ||
Makefile |