1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net/gnrc/network_layer/sixlowpan
Yonezawa-T2 5cb904b57e gnrc_sixlowpan_nd: fixed crash on gnrc_sixlowpan_nd_next_hop_l2addr.
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
2016-01-07 10:02:49 +09:00
..
ctx ipv6: ndp: sixlowpan: remove vtimer includes 2015-11-02 15:02:08 +01:00
frag gnrc_sixlowpan: Fix IPHC/NHC packet order problem 2015-12-22 17:14:33 +01:00
iphc sixlowpan: iphc: fix dependencies for udp and nhc 2015-12-23 13:57:55 +01:00
nd gnrc_sixlowpan_nd: fixed crash on gnrc_sixlowpan_nd_next_hop_l2addr. 2016-01-07 10:02:49 +09:00
netif gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00
gnrc_sixlowpan.c sixlowpan: iphc: remove dispatch and assign result to pkt 2015-12-22 20:54:39 +01:00
Makefile gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00