From owner-svn-src-all@FreeBSD.ORG Fri Jun 6 17:42:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B6D33A2; Fri, 6 Jun 2014 17:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 4CDF42BED; Fri, 6 Jun 2014 17:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s56HgurI056439; Fri, 6 Jun 2014 17:42:56 GMT (envelope-from asomers@svn.freebsd.org) Received: (from asomers@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s56HgtxI056436; Fri, 6 Jun 2014 17:42:55 GMT (envelope-from asomers@svn.freebsd.org) Message-Id: <201406061742.s56HgtxI056436@svn.freebsd.org> From: Alan Somers Date: Fri, 6 Jun 2014 17:42:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r267175 - in stable/10: sys/netinet tests/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jun 2014 17:42:56 -0000 Author: asomers Date: Fri Jun 6 17:42:55 2014 New Revision: 267175 URL: http://svnweb.freebsd.org/changeset/base/267175 Log: MFC r263779 Correct ARP update handling when the routes for network interfaces are restricted to a single FIB in a multifib system. Restricting an interface's routes to the FIB to which it is assigned (by setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve: can't allocate llinfo for x.x.x.x". This is due to the ARP update code hard coding it's lookup for existing routing entries to FIB 0. sys/netinet/in.c: When dealing with RTM_ADD (add route) requests for an interface, use the interface's assigned FIB instead of the default (FIB 0). sys/netinet/if_ether.c: In arpresolve(), enhance error message generated when an lla_lookup() fails so that the interface causing the error is visible in logs. tests/sys/netinet/fibs_test.sh Clear ATF expected error. Modified: stable/10/sys/netinet/if_ether.c stable/10/sys/netinet/in.c stable/10/tests/sys/netinet/fibs_test.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/if_ether.c ============================================================================== --- stable/10/sys/netinet/if_ether.c Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/sys/netinet/if_ether.c Fri Jun 6 17:42:55 2014 (r267175) @@ -338,8 +338,8 @@ retry: if (la == NULL) { if (flags & LLE_CREATE) log(LOG_DEBUG, - "arpresolve: can't allocate llinfo for %s\n", - inet_ntoa(SIN(dst)->sin_addr)); + "arpresolve: can't allocate llinfo for %s on %s\n", + inet_ntoa(SIN(dst)->sin_addr), ifp->if_xname); m_freem(m); return (EINVAL); } Modified: stable/10/sys/netinet/in.c ============================================================================== --- stable/10/sys/netinet/in.c Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/sys/netinet/in.c Fri Jun 6 17:42:55 2014 (r267175) @@ -1303,8 +1303,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_ KASSERT(l3addr->sa_family == AF_INET, ("sin_family %d", l3addr->sa_family)); - /* XXX rtalloc1 should take a const param */ - rt = rtalloc1(__DECONST(struct sockaddr *, l3addr), 0, 0); + /* XXX rtalloc1_fib should take a const param */ + rt = rtalloc1_fib(__DECONST(struct sockaddr *, l3addr), 0, 0, + ifp->if_fib); if (rt == NULL) return (EINVAL); Modified: stable/10/tests/sys/netinet/fibs_test.sh ============================================================================== --- stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 17:38:37 2014 (r267174) +++ stable/10/tests/sys/netinet/fibs_test.sh Fri Jun 6 17:42:55 2014 (r267175) @@ -55,7 +55,6 @@ arpresolve_checks_interface_fib_head() } arpresolve_checks_interface_fib_body() { - atf_expect_fail "kern/167947 arpresolve checks only the default FIB for the interface route" # Configure the TAP interfaces to use a RFC5737 nonrouteable addresses # and a non-default fib ADDR0="192.0.2.2"