On Fri, Mar 24, 2017 at 03:29:28PM +0100, Martin Pieuchot wrote:
> It's wrong to call nd6_invalidate() at the beginning of nd6_free() since
> the default router selection logic check for the ND state of the entry.

Make sense.  We did not intend to change default router selection.
It was introduced to get the (!ISSET(rt->rt_flags, RTF_STATIC|RTF_CACHED))
check right.

> Could you tell me if the diff below solve the issue?

If it helps, move it down.  OK bluhm@

> Index: netinet6//nd6.c
> ===================================================================
> RCS file: /cvs/src/sys/netinet6/nd6.c,v
> retrieving revision 1.206
> diff -u -p -r1.206 nd6.c
> --- netinet6//nd6.c   8 Mar 2017 09:34:43 -0000       1.206
> +++ netinet6//nd6.c   24 Mar 2017 14:24:51 -0000
> @@ -748,8 +748,6 @@ nd6_free(struct rtentry *rt, int gc)
>  
>       splsoftassert(IPL_SOFTNET);
>  
> -     nd6_invalidate(rt);
> -
>       /*
>        * we used to have pfctlinput(PRC_HOSTDEAD) here.
>        * even though it is not harmful, it was not really necessary.
> @@ -830,6 +828,8 @@ nd6_free(struct rtentry *rt, int gc)
>        * a side effect (XXX).
>        */
>       next = TAILQ_NEXT(ln, ln_list);
> +
> +     nd6_invalidate(rt);
>  
>       /*
>        * Detach the route from the routing tree and the list of neighbor

Reply via email to