Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2003 11:40:15 -0700 (PDT)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/52758: bogus default IP route (netstat -rn/route add) handling/display.
Message-ID:  <200305281840.h4SIeFnP011514@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/52758; it has been noted by GNATS.

From: Ruslan Ermilov <ru@FreeBSD.org>
To: Eric AUGE <eauge@fr.cw.net>
Cc: bug-followup@FreeBSD.org
Subject: Re: bin/52758: bogus default IP route (netstat -rn/route add) handling/display.
Date: Wed, 28 May 2003 21:34:31 +0300

 There's nothing unexpected here; route(8) displays non-contiguous
 netmasks this way: key&netmask.  The default route is the route
 with both key and mask of all zeroes, by definition.  When you
 specify a third argument (netmask), it becomes non-default, but
 rather a ``-net 0 -netmask <netmask>''.
 
 On Wed, May 28, 2003 at 05:44:59PM +0200, Eric AUGE wrote:
 > 
 > >Number:         52758
 > >Category:       bin
 > >Synopsis:       bogus default IP route (netstat -rn/route add) handling/display.
 > >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 28 08:50:12 PDT 2003
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Eric AUGE
 > >Release:        FreeBSD 5.0-RELEASE-p7 i386
 > >Organization:
 > no
 > >Environment:
 > System: FreeBSD eauge.fr.cw.net 5.0-RELEASE-p7 FreeBSD 5.0-RELEASE-p7 #2: Mon Mar 31 15:41:21 CEST 2003 root@eauge.fr.cw.net:/usr/obj/usr/src/sys/EAUGE-5 i386
 > 
 > CPU: Pentium III/Pentium III Xeon/Celeron (701.59-MHz 686-class CPU)
 > 
 > >Description:
 > 
 > 	First i add IP default bogus routes by giving a bad netmask value 
 >         (i assume it's netmask according to man (8) route)
 > 
 > 	root@eauge ~ # route add default 200.200.200.200 10.10.10.10 
 > 	add net default: gateway 200.200.200.200
 >  	root@eauge ~ # route add default 127.0.0.45 62.4.8.9 10.0.0.0
 > 	...
 > 	...
 > 	root@eauge ~ # route add default 127.0.0.3 62.4.1.125
 > 	...
 > 
 > 	After Adding looking at the IP routes show strange entries,
 > 	and everything still works correctly, this work with local
 > 	and remote bogus addresses, then some hosts (cvsup2.fr.freebsd.org) just doesn't work 
 > 	with standards errors and then works again, etc...
 > 
 > 	root@eauge ~ # netstat -rn -f inet
 > 	Routing tables
 > 
 > 	Internet:
 > 	Destination        Gateway            Flags    Refs      Use  Netif Expire
 > 	0&0xa0a0a0a        200.200.200.200    UGSc        0        0    lo0 =>
 > 	0&0x3e040809       127.0.0.45         UGSc        0        0    lo0 =>
 > 	0&0x3e04017d       127.0.0.3          UGSc        0        0    lo0 =>
 > 	0&0xffffff18       127.0.0.3          UGSc        0        0    lo0 =>
 > 	0&0x64646464       127.0.0.2          UGSc        0        0    lo0 =>
 > 	0&0x3e0403fe       127.0.0.2          UGSc        0        0    lo0 =>
 > 	0&0x3e0402fe       127.0.0.1          UGSc        0        0    lo0 =>
 > 	0&0x1010101        127.0.0.2          UGSc        2        0    lo0 =>
 > 	0&0xa000000        127.0.0.3          UGSc        0        0    lo0 =>
 > 	default            62.4.1.254         UGSc       16      393   fxp0
 > 	62.4/23            link#1             UC          2        0   fxp0
 > 	62.4.0.126         127.0.0.1          UGHS        0        0    lo0
 > 	62.4.0.254         00:03:6b:c0:e8:80  UHLW        0        0   fxp0    433
 > 	62.4.1.254         00:03:6b:c0:e8:80  UHLW        7        0   fxp0    981
 > 	127.0.0.1          127.0.0.1          UH          2      216    lo0
 > 
 > 
 > >How-To-Repeat:
 > 	Just insert bogus routes, using the commands above to see.
 > >Fix:
 > 	No fix yet, working on a patch.
 
 -- 
 Ruslan Ermilov		Sysadmin and DBA,
 ru@sunbay.com		Sunbay Software AG,
 ru@FreeBSD.org		FreeBSD committer.



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