From owner-freebsd-bugs@FreeBSD.ORG Wed May 28 11:40:16 2003 Return-Path: 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 8B1FE37B405 for ; Wed, 28 May 2003 11:40:16 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1046443F93 for ; Wed, 28 May 2003 11:40:16 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h4SIeFUp011515 for ; Wed, 28 May 2003 11:40:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h4SIeFnP011514; Wed, 28 May 2003 11:40:15 -0700 (PDT) Date: Wed, 28 May 2003 11:40:15 -0700 (PDT) Message-Id: <200305281840.h4SIeFnP011514@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ruslan Ermilov Subject: Re: bin/52758: bogus default IP route (netstat -rn/route add) handling/display. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ruslan Ermilov List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 18:40:17 -0000 The following reply was made to PR bin/52758; it has been noted by GNATS. From: Ruslan Ermilov To: Eric AUGE 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 ''. 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.