Added sanity check to avoid deleting DS6 neighbor table entry for a default route
This commit is contained in:
parent
dbd4f1c579
commit
74baca91b1
|
@ -335,7 +335,7 @@ uip_ds6_nbr_add(uip_ipaddr_t *ipaddr, uip_lladdr_t *lladdr,
|
||||||
for(n = uip_ds6_nbr_cache;
|
for(n = uip_ds6_nbr_cache;
|
||||||
n < &uip_ds6_nbr_cache[UIP_DS6_NBR_NB];
|
n < &uip_ds6_nbr_cache[UIP_DS6_NBR_NB];
|
||||||
n++) {
|
n++) {
|
||||||
if(n->isused) {
|
if(n->isused && !uip_ds6_defrt_lookup(&n->ipaddr)) {
|
||||||
if(n->last_lookup < oldest_time) {
|
if(n->last_lookup < oldest_time) {
|
||||||
oldest = n;
|
oldest = n;
|
||||||
oldest_time = n->last_lookup;
|
oldest_time = n->last_lookup;
|
||||||
|
|
Loading…
Reference in a new issue