This brings nd6_free() in line with arptfree() and adds a userland
notification for free.

ok?

Index: netinet6/nd6.c
===================================================================
RCS file: /cvs/src/sys/netinet6/nd6.c,v
retrieving revision 1.154
diff -u -p -r1.154 nd6.c
--- netinet6/nd6.c      18 Sep 2015 14:26:22 -0000      1.154
+++ netinet6/nd6.c      25 Sep 2015 11:05:38 -0000
@@ -787,7 +787,6 @@ nd6_is_addr_neighbor(struct sockaddr_in6
 struct llinfo_nd6 *
 nd6_free(struct rtentry *rt, int gc)
 {
-       struct rt_addrinfo info;
        struct llinfo_nd6 *ln = (struct llinfo_nd6 *)rt->rt_llinfo, *next;
        struct in6_addr in6 = satosin6(rt_key(rt))->sin6_addr;
        struct nd_defrouter *dr;
@@ -879,11 +878,7 @@ nd6_free(struct rtentry *rt, int gc)
         * caches, and disable the route entry not to be used in already
         * cached routes.
         */
-       bzero(&info, sizeof(info));
-       info.rti_info[RTAX_DST] = rt_key(rt);
-       info.rti_info[RTAX_NETMASK] = rt_mask(rt);
-       rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL,
-           rt->rt_ifp->if_rdomain);
+       rtdeletemsg(rt, rt->rt_ifp->if_rdomain);
        splx(s);
 
        return (next);

Reply via email to