Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jun 2014 17:42:55 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
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
Message-ID:  <201406061742.s56HgtxI056436@svn.freebsd.org>

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



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