Index: head/sys/net/if_var.h =================================================================== --- head/sys/net/if_var.h +++ head/sys/net/if_var.h @@ -61,6 +61,7 @@ */ struct rtentry; /* ifa_rtrequest */ +struct nhop_object; /* ifa_rtrequest */ struct rt_addrinfo; /* ifa_rtrequest */ struct socket; struct carp_if; @@ -551,7 +552,8 @@ struct carp_softc *ifa_carp; /* pointer to CARP data */ CK_STAILQ_ENTRY(ifaddr) ifa_link; /* queue macro glue */ void (*ifa_rtrequest) /* check or clean routes (+ or -)'d */ - (int, struct rtentry *, struct rt_addrinfo *); + (int, struct rtentry *, struct nhop_object *, + struct rt_addrinfo *); u_short ifa_flags; /* mostly rt_flags for cloning */ #define IFA_ROUTE RTF_UP /* route installed */ #define IFA_RTSELF RTF_HOST /* loopback route to self installed */ Index: head/sys/net/route.c =================================================================== --- head/sys/net/route.c +++ head/sys/net/route.c @@ -1239,7 +1239,7 @@ */ ifa = rt->rt_ifa; if (ifa != NULL && ifa->ifa_rtrequest != NULL) - ifa->ifa_rtrequest(RTM_DELETE, rt, info); + ifa->ifa_rtrequest(RTM_DELETE, rt, rt->rt_nhop, info); /* * One more rtentry floating around that is not @@ -1761,7 +1761,7 @@ * allow it to do that as well. */ if (ifa->ifa_rtrequest) - ifa->ifa_rtrequest(RTM_ADD, rt, info); + ifa->ifa_rtrequest(RTM_ADD, rt, rt->rt_nhop, info); /* * actually return a resultant rtentry and @@ -1886,7 +1886,8 @@ if (info->rti_ifa != NULL && info->rti_ifa != rt->rt_ifa && rt->rt_ifa != NULL) { if (rt->rt_ifa->ifa_rtrequest != NULL) - rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, info); + rt->rt_ifa->ifa_rtrequest(RTM_DELETE, rt, rt->rt_nhop, + info); ifa_free(rt->rt_ifa); rt->rt_ifa = NULL; } @@ -1910,7 +1911,7 @@ rt->rt_flags |= info->rti_flags & RTF_FMASK; if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest != NULL) - rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, info); + rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, nh, info); /* Alter route MTU if necessary */ if (rt->rt_ifp != NULL) { Index: head/sys/netinet6/nd6.c =================================================================== --- head/sys/netinet6/nd6.c +++ head/sys/netinet6/nd6.c @@ -138,7 +138,8 @@ static void nd6_llinfo_timer(void *); static void nd6_llinfo_settimer_locked(struct llentry *, long); static void clear_llinfo_pqueue(struct llentry *); -static void nd6_rtrequest(int, struct rtentry *, struct rt_addrinfo *); +static void nd6_rtrequest(int, struct rtentry *, struct nhop_object *, + struct rt_addrinfo *); static int nd6_resolve_slow(struct ifnet *, int, struct mbuf *, const struct sockaddr_in6 *, u_char *, uint32_t *, struct llentry **); static int nd6_need_cache(struct ifnet *); @@ -1562,13 +1563,12 @@ * processing. */ void -nd6_rtrequest(int req, struct rtentry *rt, struct rt_addrinfo *info) +nd6_rtrequest(int req, struct rtentry *rt, struct nhop_object *nh, + struct rt_addrinfo *info) { struct sockaddr_in6 *gateway; struct nd_defrouter *dr; - struct nhop_object *nh; - nh = rt->rt_nhop; gateway = &nh->gw6_sa; switch (req) {