aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2014-03-26 22:46:03 +0000
committerAlan Somers <asomers@FreeBSD.org>2014-03-26 22:46:03 +0000
commit743c072a09a2ddef7ca4889cc6ce06f562260248 (patch)
tree5c8439f7c5a34228e3acf856feb4ae38c790907e /sys/netinet
parent54ff5d7323e6b110e8796cdd412a39b7d13fb66d (diff)
downloadsrc-743c072a09a2ddef7ca4889cc6ce06f562260248.tar.gz
src-743c072a09a2ddef7ca4889cc6ce06f562260248.zip
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@gmail.com> (previous version) Reviewed by: melifaro MFC after: 3 weeks Sponsored by: Spectra Logic Corporation
Notes
Notes: svn path=/head/; revision=263779
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c4
-rw-r--r--sys/netinet/in.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index a26e179fd987..f40c683be4e2 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -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);
}
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index e4a54b2716de..b36d2e224ee9 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -994,8 +994,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);