Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2002 17:29:25 -0700 (PDT)
From:      Reza Sabdar <sabdar@procom.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/44185: Problem adding route with -interface option "can't allocate llinfo"
Message-ID:  <200210180029.g9I0TP8b052496@www.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         44185
>Category:       misc
>Synopsis:       Problem adding route with -interface option "can't allocate llinfo"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 17:30:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Reza Sabdar
>Release:        4.3
>Organization:
Procom Technology
>Environment:
FreeBSD fbsd5.procom.com 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Tue Jul 31 17:19:10 GMT 2001 i386
>Description:
While trying to add a direct static route with -interface option with:
#route add -interface <desination IP> <Interface IP>
the kernel logs : arp_rtrequest: bad gateway value
and any subsequent activity, e.g. ping result in the following log over
and over in the system:
arplookup 142.128.91.22 failed: could not allocate llinfo
arpresolve: can't allocate llinfo for 142.128.91.22rt


>How-To-Repeat:
Suppose that your FreeBSD IP is 142.128.91.21 and you have another system on the same network with IP 142.128.91.22, I want to define a direct static route to that system:
#route add -interface 142.128.91.22 142.128.91.21
add host 142.128.91.22: gateway 142.128.91.21
then
#ping 142.128.91.21 -> fails
#dmesg
arpresolve: can't allocate llinfo for ...



>Fix:
The problem seems to be related to arp_rtrequest() being called with the new interface route entry and with the NIC address as gateway which apparently isn't a AF_LINK type so arp_rtrequest() exits with "bad gateway" error not allocating the llinfo so the rt->rt_llinfo remains null. On any subsequent arpresolve() call, it gets the route entry as an arp and expects to find the llinfo but it is null so it presumes that the allocation has been failed reporting "can't allocate llinfo". Note that even trying to add the ARP entry for the given destination is useless because it returns with EEXISTS error. By taking advantage of RTF_STATIC flag I changed the Net/3 code so that this new entry can play both roles of an ARP and route entry at the same time. Please let me know if you verify the problem and how can I submit my changes to freebsd.org
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210180029.g9I0TP8b052496>