On Wed, Nov 23, 2022 at 10:00:52PM +0000, Klemens Nanni wrote: > On Wed, Nov 23, 2022 at 10:47:53PM +0100, Claudio Jeker wrote: > > On Wed, Nov 23, 2022 at 02:54:08PM +0000, Klemens Nanni wrote: > > > void > > > -nd6_ifdetach(struct nd_ifinfo *nd) > > > +nd6_ifdetach(struct ifnet *ifp) > > > { > > > + struct nd_ifinfo *nd = ifp->if_nd; > > > > > > > Would it make sense to set ifp->if_nd = NULL; here? > > > > > free(nd, M_IP6NDP, sizeof(*nd)); > > > } > > I don't think so, the interface is about to be destroyed and disappear > shortly after nd6_ifdetach() and if_detach() return.
That may be correct right now. What if someone calls nd6_ifdetach when ifconfig if0 -inet6 is called? That's why I think it makes sense to set the ifp-?if_nd pointer to NULL here. -- :wq Claudio