Author: melifaro
Date: Sun Nov 15 16:02:22 2015
New Revision: 290867
URL: https://svnweb.freebsd.org/changeset/base/290867

Log:
  Bring back the ability of passing cached route via nd6_output_ifp().

Modified:
  head/sys/netinet6/ip6_forward.c
  head/sys/netinet6/ip6_output.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6.h
  head/sys/netpfil/pf/pf.c

Modified: head/sys/netinet6/ip6_forward.c
==============================================================================
--- head/sys/netinet6/ip6_forward.c     Sun Nov 15 14:51:10 2015        
(r290866)
+++ head/sys/netinet6/ip6_forward.c     Sun Nov 15 16:02:22 2015        
(r290867)
@@ -571,7 +571,7 @@ pass:
                goto bad;
        }
 
-       error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst);
+       error = nd6_output_ifp(rt->rt_ifp, origifp, m, dst, NULL);
        if (error) {
                in6_ifstat_inc(rt->rt_ifp, ifs6_out_discard);
                IP6STAT_INC(ip6s_cantforward);

Modified: head/sys/netinet6/ip6_output.c
==============================================================================
--- head/sys/netinet6/ip6_output.c      Sun Nov 15 14:51:10 2015        
(r290866)
+++ head/sys/netinet6/ip6_output.c      Sun Nov 15 16:02:22 2015        
(r290867)
@@ -935,7 +935,7 @@ passout:
                            m->m_pkthdr.len);
                        ifa_free(&ia6->ia_ifa);
                }
-               error = nd6_output_ifp(ifp, origifp, m, dst);
+               error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
                goto done;
        }
 
@@ -1034,7 +1034,7 @@ sendorfree:
                                counter_u64_add(ia->ia_ifa.ifa_obytes,
                                    m->m_pkthdr.len);
                        }
-                       error = nd6_output_ifp(ifp, origifp, m, dst);
+                       error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
                } else
                        m_freem(m);
        }

Modified: head/sys/netinet6/nd6.c
==============================================================================
--- head/sys/netinet6/nd6.c     Sun Nov 15 14:51:10 2015        (r290866)
+++ head/sys/netinet6/nd6.c     Sun Nov 15 16:02:22 2015        (r290867)
@@ -1905,7 +1905,7 @@ nd6_grab_holdchain(struct llentry *ln, s
 
 int
 nd6_output_ifp(struct ifnet *ifp, struct ifnet *origifp, struct mbuf *m,
-    struct sockaddr_in6 *dst)
+    struct sockaddr_in6 *dst, struct route *ro)
 {
        int error;
        int ip6len;
@@ -1944,7 +1944,7 @@ nd6_output_ifp(struct ifnet *ifp, struct
        if ((ifp->if_flags & IFF_LOOPBACK) == 0)
                origifp = ifp;
 
-       error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, NULL);
+       error = (*ifp->if_output)(origifp, m, (struct sockaddr *)dst, ro);
        return (error);
 }
 
@@ -2192,7 +2192,7 @@ nd6_flush_holdchain(struct ifnet *ifp, s
        while (m_head) {
                m = m_head;
                m_head = m_head->m_nextpkt;
-               error = nd6_output_ifp(ifp, origifp, m, dst);
+               error = nd6_output_ifp(ifp, origifp, m, dst, NULL);
        }
 
        /*

Modified: head/sys/netinet6/nd6.h
==============================================================================
--- head/sys/netinet6/nd6.h     Sun Nov 15 14:51:10 2015        (r290866)
+++ head/sys/netinet6/nd6.h     Sun Nov 15 16:02:22 2015        (r290867)
@@ -422,7 +422,7 @@ int nd6_flush_holdchain(struct ifnet *, 
 int nd6_add_ifa_lle(struct in6_ifaddr *);
 void nd6_rem_ifa_lle(struct in6_ifaddr *, int);
 int nd6_output_ifp(struct ifnet *, struct ifnet *, struct mbuf *,
-    struct sockaddr_in6 *);
+    struct sockaddr_in6 *, struct route *);
 
 /* nd6_nbr.c */
 void nd6_na_input(struct mbuf *, int, int);

Modified: head/sys/netpfil/pf/pf.c
==============================================================================
--- head/sys/netpfil/pf/pf.c    Sun Nov 15 14:51:10 2015        (r290866)
+++ head/sys/netpfil/pf/pf.c    Sun Nov 15 16:02:22 2015        (r290867)
@@ -5588,7 +5588,7 @@ pf_route6(struct mbuf **m, struct pf_rul
        if (IN6_IS_SCOPE_EMBED(&dst.sin6_addr))
                dst.sin6_addr.s6_addr16[1] = htons(ifp->if_index);
        if ((u_long)m0->m_pkthdr.len <= ifp->if_mtu)
-               nd6_output_ifp(ifp, ifp, m0, &dst);
+               nd6_output_ifp(ifp, ifp, m0, &dst, NULL);
        else {
                in6_ifstat_inc(ifp, ifs6_in_toobig);
                if (r->rt != PF_DUPTO)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to