misc/167947: arpresolve checks only the default FIB for the
interface route
Nikolay Denev
ndenev at gmail.com
Wed May 16 03:50:02 UTC 2012
>Number: 167947
>Category: misc
>Synopsis: arpresolve checks only the default FIB for the interface route
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed May 16 03:50:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Nikolay Denev
>Release: FreeBSD-8.3-STABLE
>Organization:
>Environment:
FreeBSD fw1 8.3-STABLE FreeBSD 8.3-STABLE #2: Tue May 8 11:56:45 CEST 2012 ndenev at fw1:/usr/obj/usr/src/sys/KERN-IPFW amd64
>Description:
arpresolve() checks if a connected route exists before adding ARP entries to the arp table.
The problem is that it only checks the default FIB 0.
When one does have interface in non default FIB with it's directly attached routes removed from the default FIB, arpresolve fails and no ARP entries can be added :
arpresolve: can't allocate llinfo for x.x.x.x
>How-To-Repeat:
put these in /boot/loader.conf :
net.add_addr_allfibs="0"
net.fibs="8"
Then :
/usr/sbin/setfib 1 /sbin/ifconfig em1 10.180.0.2 netmask 255.255.255.0 fib 1
/usr/sbin/setfib 1 /sbin/route add default 10.180.0.254
Now then I try to ping the host from its gw 10.180.0.254, the host generates
"arpresolve: can't allocate llinfo for 10.180.0.254" messages.
>Fix:
Apply the included patch.
Patch attached with submission follows:
--- in.c.orig 2012-05-12 08:57:17.000000000 +0200
+++ in.c 2012-05-12 08:56:43.000000000 +0200
@@ -1418,21 +1418,21 @@
static int
in_lltable_rtcheck(struct ifnet *ifp, u_int flags, const struct sockaddr *l3addr)
{
struct rtentry *rt;
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);
+ rt = rtalloc1_fib(__DECONST(struct sockaddr *, l3addr), 0, 0, ifp->if_fib);
if (rt == NULL)
return (EINVAL);
/*
* If the gateway for an existing host route matches the target L3
* address, which is a special route inserted by some implementation
* such as MANET, and the interface is of the correct type, then
* allow for ARP to proceed.
*/
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list