From 8344290e0898bb54a68d0e417a7a1c6dee992200 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Thu, 7 May 2015 16:58:23 +0200 Subject: [PATCH] Added missing sanity check in uip-ds6-route.c --- core/net/ipv6/uip-ds6-route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/net/ipv6/uip-ds6-route.c b/core/net/ipv6/uip-ds6-route.c index 3931319a0..49e3d3588 100644 --- a/core/net/ipv6/uip-ds6-route.c +++ b/core/net/ipv6/uip-ds6-route.c @@ -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; }