From nobody@FreeBSD.ORG  Tue Sep 26 07:53:42 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id DF41837B424; Tue, 26 Sep 2000 07:53:41 -0700 (PDT)
Message-Id: <20000926145341.DF41837B424@hub.freebsd.org>
Date: Tue, 26 Sep 2000 07:53:41 -0700 (PDT)
From: madamus@connectalk.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: route takes the netmask as the default gateway, creating a bad route.
X-Send-Pr-Version: www-1.0

>Number:         21562
>Category:       misc
>Synopsis:       route takes the netmask as the default gateway, creating a bad route.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 26 08:00:01 PDT 2000
>Closed-Date:    Tue Sep 26 09:33:59 PDT 2000
>Last-Modified:  Tue Sep 26 09:34:19 PDT 2000
>Originator:     Michel Adamus
>Release:        4.1
>Organization:
ConnecTalk
>Environment:
FreeBSD apollo.connectalk.com 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Sat Sep 23 15:41:27 EDT 2000     madamus@apollo.connectalk.com:/usr/src/sys/compile/APOLLO  i386

>Description:
route -n add -net 10.150.200.0 255.255.252.0 10.125.200.199

will add a bad route to the system. A route that can't be deleted.

It looks like this using "netstat -rn"
Destination         Gateway            Flags      Netif Expire
default             10.125.204.1       UGSc        3        9     fxp0
10.20.200&0xa7dc8c7 255.255.252.0      UGSc        0        0     fxp0

the correct route command should be:
route -n add -net 10.150.200.0 -netmask 255.255.252.0 10.125.200.199

Comment: route should not allow this.
>How-To-Repeat:
Simply omit the "-netmask" when adding a new route.
>Fix:
reboot

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: will 
State-Changed-When: Tue Sep 26 09:33:59 PDT 2000 
State-Changed-Why:  
Duplicate of PR#21561. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21562 
>Unformatted:
