-/* $OpenBSD: if.c,v 1.680 2022/11/14 22:45:02 kn Exp $ */
+/* $OpenBSD: if.c,v 1.681 2022/11/23 14:48:27 kn Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
if_addgroup(ifp, IFG_ALL);
if_attachdomain(ifp);
+#ifdef INET6
+ ifp->if_nd = nd6_ifattach(ifp);
+#endif
+
#if NPF > 0
pfi_attach_ifnet(ifp);
#endif
(*dp->dom_ifdetach)(ifp,
ifp->if_afdata[dp->dom_family]);
}
+#ifdef INET6
+ nd6_ifdetach(ifp->if_nd);
+#endif
/* Announce that the interface is gone. */
rtm_ifannounce(ifp, IFAN_DEPARTURE);
-/* $OpenBSD: if_var.h,v 1.120 2022/11/14 22:06:26 kn Exp $ */
+/* $OpenBSD: if_var.h,v 1.121 2022/11/23 14:48:27 kn Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
struct sockaddr_dl *if_sadl; /* [N] pointer to our sockaddr_dl */
void *if_afdata[AF_MAX];
+ struct nd_ifinfo *if_nd; /* [I] IPv6 Neighour Discovery info */
};
#define if_mtu if_data.ifi_mtu
#define if_type if_data.ifi_type
-/* $OpenBSD: in6.c,v 1.255 2022/11/23 07:57:39 kn Exp $ */
+/* $OpenBSD: in6.c,v 1.256 2022/11/23 14:48:28 kn Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
return (1);
}
}
-
-void *
-in6_domifattach(struct ifnet *ifp)
-{
- return nd6_ifattach(ifp);
-}
-
-void
-in6_domifdetach(struct ifnet *ifp, void *aux)
-{
- nd6_ifdetach(aux);
-}
-/* $OpenBSD: in6_proto.c,v 1.111 2022/09/02 13:12:32 mvs Exp $ */
+/* $OpenBSD: in6_proto.c,v 1.112 2022/11/23 14:48:28 kn Exp $ */
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
/*
.dom_sasize = sizeof(struct sockaddr_in6),
.dom_rtoffset = offsetof(struct sockaddr_in6, sin6_addr),
.dom_maxplen = 128,
- .dom_ifattach = in6_domifattach,
- .dom_ifdetach = in6_domifdetach
};
/*
-/* $OpenBSD: nd6.h,v 1.83 2022/11/23 07:57:39 kn Exp $ */
+/* $OpenBSD: nd6.h,v 1.84 2022/11/23 14:48:28 kn Exp $ */
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
/*
#include <sys/queue.h>
#define ND_IFINFO(ifp) \
- ((struct nd_ifinfo *)(ifp)->if_afdata[AF_INET6])
+ ((ifp)->if_nd)
struct llinfo_nd6 {
TAILQ_ENTRY(llinfo_nd6) ln_list;