From owner-freebsd-net Fri Nov 23 18:10:10 2001 Delivered-To: freebsd-net@freebsd.org Received: from mailrelay.netcologne.de (mailrelay.netcologne.de [194.8.194.96]) by hub.freebsd.org (Postfix) with ESMTP id 1162337B417; Fri, 23 Nov 2001 18:10:00 -0800 (PST) Received: from design.freestyling.de (design.freestyling.de [195.14.253.182]) by mailrelay.netcologne.de (8.11.6/8.11.6) with ESMTP id fAO29w726703; Sat, 24 Nov 2001 03:09:58 +0100 (MET) X-Received: from tick.sc.omation.com (64-58-167-31.cbi.cox-oc.net [64.58.167.31] (may be forged)) by design.freestyling.de (8.11.3/8.11.3) with ESMTP id fAO2D0284832 for ; Sat, 24 Nov 2001 03:13:00 +0100 (CET) (envelope-from pherman@frenchfries.net) X-Received: from tick.sc.omation.com (tick.sc.omation.com [192.168.128.2]) by tick.sc.omation.com (8.11.6/8.11.6) with ESMTP id fAO28ja01369; Fri, 23 Nov 2001 18:08:45 -0800 (PST) (envelope-from pherman@frenchfries.net) Date: Fri, 23 Nov 2001 18:08:45 -0800 (PST) From: Paul Herman X-X-Sender: To: Ruslan Ermilov Cc: Subject: Re: arp_rtrequest: bad gateway value In-Reply-To: <20011122113610.C32952@sunbay.com> Message-ID: <20011123160634.I49441-100000@tick.sc.omation.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org [...off list...] On Thu, 22 Nov 2001, Ruslan Ermilov wrote: > On Wed, Nov 21, 2001 at 05:32:27PM -0800, Paul Herman wrote: > > Hi, > > > > I'd like to pick some brains before I file a PR. > > > There's already a PR open on this, kern/29170. > > [...] > > There's the problem with routed(8). It issues a command > similar to "route change ip ip" for each (but last) IP address > of an interface if the route already exists and is different. > This results in a changed route with AF_INET gateway, but > route's IFA still points to Ethernet device and > rt_ifa->ifa_rtrequest == arp_rtrequest. This results in this > message as AF_INET != AF_LINK. The message is harmless. Well this definately seems to me like bug in the kernel, because route_output()/arp_rtrequest() both allow me to change the gateway from a link addr to an inet addr, but still retain the RTF_LLINFO flag. This is an inconsistent state and should not be allowed. Correct me if I'm wrong, but is there any (historical) case where you would want this state? Possible solutions: 1) Ignore the change of the gateway if the AF_ type and RTF_ flags don't jive. 2) Return an EINVAL if you try to assign an AF_INET gateway to an existing route that has RTF_LLINFO set. 3) If an AF_INET gateway is given to an existing route with RTF_LLINFO set, try to convert the address to its link layer address, and then update the route. IMO, although #1 obeys POLA but might be to permissive, and #3 is probably to complicated for the kernel to do, so I think #2 might be best. Solution #2 would break routed, of course, so it would also have to be changed, as well. FWIW gated works fine and doesn't exhibit the same behaviour that routed does. Dunno about zebra, haven't checked. I'll be happy to see if I can whip up a patch, what does everyone else think? -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message