svn commit: r271809 - stable/9/sys/netinet

Alan Somers asomers at FreeBSD.org
Thu Sep 18 20:17:43 UTC 2014


Author: asomers
Date: Thu Sep 18 20:17:42 2014
New Revision: 271809
URL: http://svnweb.freebsd.org/changeset/base/271809

Log:
  MFC 263779, except for the ATF test change.
  
  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.
  
  PR:             kern/167947

Modified:
  stable/9/sys/netinet/if_ether.c
  stable/9/sys/netinet/in.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/if_ether.c
==============================================================================
--- stable/9/sys/netinet/if_ether.c	Thu Sep 18 20:17:27 2014	(r271808)
+++ stable/9/sys/netinet/if_ether.c	Thu Sep 18 20:17:42 2014	(r271809)
@@ -326,8 +326,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/9/sys/netinet/in.c
==============================================================================
--- stable/9/sys/netinet/in.c	Thu Sep 18 20:17:27 2014	(r271808)
+++ stable/9/sys/netinet/in.c	Thu Sep 18 20:17:42 2014	(r271809)
@@ -1366,8 +1366,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);


More information about the svn-src-stable-9 mailing list