diff options
author | asomers <asomers@FreeBSD.org> | 2014-06-06 17:42:55 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2014-06-06 17:42:55 +0000 |
commit | a03c4d3869334f3d51152ee2d90066a1912afa22 (patch) | |
tree | bca9e734b3894cb019136e52fb43262294aee20a | |
parent | 83925746a3e67ab79613b86ee4d2703eaa191e19 (diff) | |
download | FreeBSD-src-a03c4d3869334f3d51152ee2d90066a1912afa22.zip FreeBSD-src-a03c4d3869334f3d51152ee2d90066a1912afa22.tar.gz |
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.
-rw-r--r-- | sys/netinet/if_ether.c | 4 | ||||
-rw-r--r-- | sys/netinet/in.c | 5 | ||||
-rwxr-xr-x | tests/sys/netinet/fibs_test.sh | 1 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 64c7bd2..f838919 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -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); } diff --git a/sys/netinet/in.c b/sys/netinet/in.c index ead30f7..68751c3 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -1303,8 +1303,9 @@ in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr 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); diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh index a74dcf8..104154b 100755 --- a/tests/sys/netinet/fibs_test.sh +++ b/tests/sys/netinet/fibs_test.sh @@ -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" |