From 223f002676829f6df15f6aa10e35f39b8de5d1d1 Mon Sep 17 00:00:00 2001 From: Joakim Eriksson Date: Thu, 26 Nov 2015 14:10:16 +0100 Subject: [PATCH] fixed the case when the lladdr did not change but the LLAO is there and it is not an override. --- core/net/ipv6/uip-nd6.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/core/net/ipv6/uip-nd6.c b/core/net/ipv6/uip-nd6.c index 0eac94c4f..316172fb2 100644 --- a/core/net/ipv6/uip-nd6.c +++ b/core/net/ipv6/uip-nd6.c @@ -534,9 +534,12 @@ na_input(void) } goto discard; } else { - if(is_override || (!is_override && nd6_opt_llao != NULL && !is_llchange) - || nd6_opt_llao == NULL) { - if(nd6_opt_llao != NULL) { + /** + * If this is an cache override, or same lladdr, or no llao - + * do updates of nbr states. + */ + if(is_override || !is_llchange || nd6_opt_llao == NULL) { + if(nd6_opt_llao != NULL && is_llchange) { uip_lladdr_t lladdr_aligned; extract_lladdr_aligned(&lladdr_aligned); @@ -554,10 +557,6 @@ na_input(void) nbr->state = NBR_REACHABLE; /* reachable time is stored in ms */ stimer_set(&(nbr->reachable), uip_ds6_if.reachable_time / 1000); - } else { - if(nd6_opt_llao != NULL && is_llchange) { - nbr->state = NBR_STALE; - } } } }