Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jan 2016 17:23:10 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r293166 - head/sys/netinet
Message-ID:  <201601041723.u04HNAxG078939@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601041723.u04HNAxG078939>