svn commit: r263779 - in head: sys/netinet tests/sys/netinet
Alan Somers
asomers at FreeBSD.org
Wed Mar 26 22:46:05 UTC 2014
Author: asomers
Date: Wed Mar 26 22:46:03 2014
New Revision: 263779
URL: http://svnweb.freebsd.org/changeset/base/263779
Log:
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.
PR: kern/167947
Submitted by: Nikolay Denev <ndenev at gmail.com> (previous version)
Reviewed by: melifaro
MFC after: 3 weeks
Sponsored by: Spectra Logic Corporation
Modified:
head/sys/netinet/if_ether.c
head/sys/netinet/in.c
head/tests/sys/netinet/fibs_test.sh
Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c Wed Mar 26 22:30:38 2014 (r263778)
+++ head/sys/netinet/if_ether.c Wed Mar 26 22:46:03 2014 (r263779)
@@ -334,8 +334,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: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c Wed Mar 26 22:30:38 2014 (r263778)
+++ head/sys/netinet/in.c Wed Mar 26 22:46:03 2014 (r263779)
@@ -994,8 +994,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: head/tests/sys/netinet/fibs_test.sh
==============================================================================
--- head/tests/sys/netinet/fibs_test.sh Wed Mar 26 22:30:38 2014 (r263778)
+++ head/tests/sys/netinet/fibs_test.sh Wed Mar 26 22:46:03 2014 (r263779)
@@ -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"
More information about the svn-src-head
mailing list