From langd@leo.org  Fri Nov 10 05:16:16 2000
Return-Path: <langd@leo.org>
Received: from mail.leo.org (atleo2.leo.org [131.159.72.4])
	by hub.freebsd.org (Postfix) with SMTP id 7DE6C37B479
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Nov 2000 05:16:15 -0800 (PST)
Received: (qmail 45567 invoked by uid 20455); 10 Nov 2000 13:16:13 -0000
Message-Id: <20001110131613.45566.qmail@mail.leo.org>
Date: 10 Nov 2000 13:16:13 -0000
From: langd@leo.org
Reply-To: langd@leo.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: bug in routed with alias ips on local interfaces
X-Send-Pr-Version: 3.2

>Number:         22737
>Category:       bin
>Synopsis:       syslog gets spammed with /kernel: arp_rtrequest: bad gateway value
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 10 05:20:01 PST 2000
>Closed-Date:    Tue Nov 27 09:06:32 PST 2001
>Last-Modified:  Tue Nov 27 09:09:00 PST 2001
>Originator:     Daniel Lang
>Release:        FreeBSD 4.1.1-STABLE i386
>Organization:
TU Muenchen
>Environment:

Multiple (alias) ips in a single physical interface, 
running routed as rip client (routed -q).

>Description:

The symptom is, that syslog gets filled with the following
error message:

/kernel: arp_rtrequest: bad gateway value

making the relevant information hard to detect.

It only occurs if the machine hosts multiple ips
on a single interface, and routed is running. 
The problem does not happen with "gated".

The error message is created in /usr/src/sys/netinet/if_ether.c,
only if a RTM_RESOLVE request is processed and the passed
rtentry contains a gateway (struct sockaddr), which is either
not an address of AF_LINK or, the length-field is smaller than
a empty dummy struct sockaddr (if I interpreted the source right).
Unfortunately I'm not too familiar with the kernel in general
and with programming routing stuff.

I did not try to set a breakpoint in the kernel debugger
and debug the kernel online, to get more hints, where the
wrong gateway strcut sockaddr is passed from.

I suspect routed has a problem with the alias ips (they have
a 0xffffffff netmask, and itself as gateway) and somehow
writes a wrong value to the routing socket?

gated does not seem to have this problem, so you could
run gated instead. It also does not occur on machines without
alias ips.

By tcpdumping the RIP packets, I detected a few wrong
configured gateways ;-), but the information itself is 
not malformed, or s.th. so it's not because of
bogus routes broadcasting crap RIP packets.

>How-To-Repeat:

ifconfig <if> inet <alias ip> netmask 0xffffffff alias
routed -q
tail -f /var/log/messages

>Fix:

use gated

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: iedowse 
State-Changed-When: Sat Nov 17 16:23:59 PST 2001 
State-Changed-Why:  

Does this problem still exist? 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22737 

From: Ian Dowse <iedowse@maths.tcd.ie>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: bin/22737: syslog gets spammed with /kernel: arp_rtrequest: bad gateway value
Date: Sun, 18 Nov 2001 16:26:03 +0000

 Adding this to the audit trail.
 
 ------- Forwarded Message
 
 Date: Sun, 18 Nov 2001 16:30:17 +0100
 From: Daniel Lang <dl@leo.org>
 To: iedowse@FreeBSD.org
 Cc: langd@leo.org, freebsd-bugs@FreeBSD.org
 Subject: Re: bin/22737: syslog gets spammed with /kernel: arp_rtrequest: bad gateway value
 Message-ID: <20011118163017.A55510@atrbg11.informatik.tu-muenchen.de>
 References: <200111180024.fAI0OGd46920@freefall.freebsd.org>
 
 Dear Ian,
 
 iedowse@FreeBSD.org wrote on Sat, Nov 17, 2001 at 04:24:16PM -0800:
 > Synopsis: syslog gets spammed with /kernel: arp_rtrequest: bad gateway value
 [..]
 > Does this problem still exist?
 > 
 > http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22737
 
 apparently yes, I do not use dynamic routing any more, but
 I just checked by starting routed. The entry in the syslog
 appeared almost immediately:
 
 /var/log/messages:
 [..]
 Nov 18 16:19:19 atleo2 /kernel: arp_rtrequest: bad gateway value
 [..]
 
 uname -a:
 FreeBSD atleo2.leo.org 4.4-STABLE FreeBSD 4.4-STABLE #3: Fri Oct 12 20:46:54 CEST 2001     root@atleo2.leo.org:/usr/obj/usr/src/sys/ATLEO2  i386
 
 ifconfig xl0:
 
 xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
         inet 131.159.72.4 netmask 0xfffffe00 broadcast 131.159.73.255
         inet6 fe80::2a0:24ff:fe45:e715%xl0 prefixlen 64 scopeid 0x1 
         inet 131.159.72.16 netmask 0xffffffff broadcast 131.159.72.16
         inet 131.159.72.17 netmask 0xffffffff broadcast 131.159.72.17
         inet 131.159.72.18 netmask 0xffffffff broadcast 131.159.72.18
         inet 131.159.72.10 netmask 0xffffffff broadcast 131.159.72.10
         inet 131.159.72.21 netmask 0xffffffff broadcast 131.159.72.21
         inet 131.159.72.25 netmask 0xffffffff broadcast 131.159.72.25
         inet 131.159.72.5 netmask 0xffffffff broadcast 131.159.72.5
         inet 131.159.72.11 netmask 0xffffffff broadcast 131.159.72.11
         inet 131.159.72.19 netmask 0xffffffff broadcast 131.159.72.19
         inet 131.159.72.1 netmask 0xffffffff broadcast 131.159.72.1
         inet 131.159.72.31 netmask 0xffffffff broadcast 131.159.72.31
         inet 131.159.72.32 netmask 0xffffffff broadcast 131.159.72.32
         inet 131.159.72.24 netmask 0xffffffff broadcast 131.159.72.24
         inet 131.159.72.27 netmask 0xffffffff broadcast 131.159.72.27
         ether 00:a0:24:45:e7:15 
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
 
 If you need more info, let me know.
 
 Best regards,
  Daniel
 - -- 
 IRCnet: Mr-Spock     - Cool people don't move, they just hang around. -  
 Daniel Lang * dl@leo.org * ++49 89 289 25735  * http://www.leo.org/~dl/
 
 To Unsubscribe: send mail to majordomo@FreeBSD.org
 with "unsubscribe freebsd-bugs" in the body of the message
 
 ------- End of Forwarded Message
 
State-Changed-From-To: feedback->open 
State-Changed-By: iedowse 
State-Changed-When: Sun Nov 18 12:29:18 PST 2001 
State-Changed-Why:  

This is still a problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22737 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Tue Nov 27 09:06:32 PST 2001 
State-Changed-Why:  
Superseded by PR kern/29170. 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Tue Nov 27 09:06:32 PST 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22737 
>Unformatted:
