Skip to content

Commit

Permalink
gnrc_sixlowpan_nd: fixed crash when there are no routers
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonezawa-T2 committed Dec 9, 2015
1 parent 9e5c188 commit a87d36a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sys/net/gnrc/network_layer/sixlowpan/nd/gnrc_sixlowpan_nd.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ kernel_pid_t gnrc_sixlowpan_nd_next_hop_l2addr(uint8_t *l2addr, uint8_t *l2addr_
next_hop = gnrc_ndp_internal_default_router();
}

/* no routers */
if (next_hop == NULL) {
return KERNEL_PID_UNDEF;
}

/* address resolution of next_hop: https://tools.ietf.org/html/rfc6775#section-5.7 */
if ((nc_entry == NULL) || (next_hop != dst)) {
/* get if not gotten from previous check */
Expand Down

0 comments on commit a87d36a

Please sign in to comment.