On 02/11/15(Mon) 22:10, Matthieu Herrb wrote:
> On Mon, Nov 02, 2015 at 04:47:37PM +0100, Martin Pieuchot wrote:
> >
> > This seems to be a horrible bug related to the complexity of the ND6 and
> > introduced by recent changes to run sleeping code in a task.
> [...]
> >
> > Diff below should work around this problem. I don't think a proper fix
> > can be written without rewriting this whole code.
>
> Thanks I'll add that to the tree on my laptop and will try it next
> time I go to TLS00.
In this case take this one, at least it compiles 8)
Index: netinet6//nd6_rtr.c
===================================================================
RCS file: /cvs/src/sys/netinet6/nd6_rtr.c,v
retrieving revision 1.133
diff -u -p -r1.133 nd6_rtr.c
--- netinet6//nd6_rtr.c 2 Nov 2015 13:54:46 -0000 1.133
+++ netinet6//nd6_rtr.c 2 Nov 2015 16:24:07 -0000
@@ -2013,11 +2013,10 @@ in6_ifadd(struct nd_prefix *pr, int priv
return (NULL); /* ifaddr must not have been allocated. */
}
- /* this is always non-NULL */
ia6 = in6ifa_ifpwithaddr(ifp, &ifra.ifra_addr.sin6_addr);
/* Perform DAD, if needed. */
- if (ia6->ia6_flags & IN6_IFF_TENTATIVE)
+ if (ia6 != NULL && ia6->ia6_flags & IN6_IFF_TENTATIVE)
nd6_dad_start(&ia6->ia_ifa);
return (ia6);