Author: melifaro
Date: Mon Jan  4 17:23:10 2016
New Revision: 293166
URL: https://svnweb.freebsd.org/changeset/base/293166

Log:
  Maintain consistent behavior: make fib4_lookup_nh_ext() return
    rt_ifp pointer by default, as done by other fib lookup functions.

Modified:
  head/sys/netinet/in_fib.c

Modified: head/sys/netinet/in_fib.c
==============================================================================
--- head/sys/netinet/in_fib.c   Mon Jan  4 17:22:06 2016        (r293165)
+++ head/sys/netinet/in_fib.c   Mon Jan  4 17:23:10 2016        (r293166)
@@ -97,7 +97,10 @@ fib4_rte_to_nh_extended(struct rtentry *
        struct sockaddr_in *gw;
        struct in_ifaddr *ia;
 
-       pnh4->nh_ifp = rte->rt_ifa->ifa_ifp;
+       if ((flags & NHR_IFAIF) != 0)
+               pnh4->nh_ifp = rte->rt_ifa->ifa_ifp;
+       else
+               pnh4->nh_ifp = rte->rt_ifp;
        pnh4->nh_mtu = min(rte->rt_mtu, rte->rt_ifp->if_mtu);
        if (rte->rt_flags & RTF_GATEWAY) {
                gw = (struct sockaddr_in *)rte->rt_gateway;
_______________________________________________
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