mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Added missing sanity check in uip-ds6-route.c
This commit is contained in:
parent
2059be3a43
commit
8344290e08
@ -280,7 +280,7 @@ uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length,
|
||||
if(r != NULL) {
|
||||
uip_ipaddr_t *current_nexthop;
|
||||
current_nexthop = uip_ds6_route_nexthop(r);
|
||||
if(uip_ipaddr_cmp(nexthop, current_nexthop)) {
|
||||
if(current_nexthop != NULL && uip_ipaddr_cmp(nexthop, current_nexthop)) {
|
||||
/* no need to update route - already correct! */
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user