From owner-svn-src-head@freebsd.org Mon Jan 4 17:23:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A952FA61713; Mon, 4 Jan 2016 17:23:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7704B18EB; Mon, 4 Jan 2016 17:23:11 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u04HNAqR078940; Mon, 4 Jan 2016 17:23:10 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u04HNAxG078939; Mon, 4 Jan 2016 17:23:10 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201601041723.u04HNAxG078939@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Mon, 4 Jan 2016 17:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293166 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 17:23:11 -0000 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;