From owner-freebsd-bugs Thu Oct 17 17:30: 4 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CB6D37B401 for ; Thu, 17 Oct 2002 17:30:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F8A943E8A for ; Thu, 17 Oct 2002 17:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9I0U1x3038614 for ; Thu, 17 Oct 2002 17:30:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9I0U1b6038613; Thu, 17 Oct 2002 17:30:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04D3F37B404 for ; Thu, 17 Oct 2002 17:29:31 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D57743E4A for ; Thu, 17 Oct 2002 17:29:30 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9I0TP7R052507 for ; Thu, 17 Oct 2002 17:29:25 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9I0TP8b052496; Thu, 17 Oct 2002 17:29:25 -0700 (PDT) Message-Id: <200210180029.g9I0TP8b052496@www.freebsd.org> Date: Thu, 17 Oct 2002 17:29:25 -0700 (PDT) From: Reza Sabdar To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44185: Problem adding route with -interface option "can't allocate llinfo" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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 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