From nobody@FreeBSD.org  Tue Apr 24 23:34:54 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id B876737B422
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 24 Apr 2001 23:34:54 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f3P6YsK89148;
	Tue, 24 Apr 2001 23:34:54 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200104250634.f3P6YsK89148@freefall.freebsd.org>
Date: Tue, 24 Apr 2001 23:34:54 -0700 (PDT)
From: mab@red-bean.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: `route change default' broken when gateway is over down interface
X-Send-Pr-Version: www-1.0

>Number:         26833
>Category:       misc
>Synopsis:       `route change default' broken when gateway is over down interface
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 24 23:40:00 PDT 2001
>Closed-Date:    Fri Jun 8 06:19:36 PDT 2001
>Last-Modified:  Fri Jun 08 06:25:13 PDT 2001
>Originator:     Matthew Braithwaite
>Release:        4.3-RELEASE
>Organization:
>Environment:
>Description:
The attached transcript says it about as well as I can hope to:  when
you ifconfig an interface down, the kernel removes the routes for
networks directly attached to that interface.  (Or, in the case of a
point-to-point interface, the route for the remote end of the link.)

After ifconfigging an interface down, you can add a route whose 
gateway is on a directly attached network, with `route add'.

However, `route change' under these conditions, when invoked to change
the route to what it already is, failed with EDQUOT.

I have reproduced this with both broadcast and point-to-point
interfaces, on FreeBSD 4.2 and 4.3, and on a number of different
machines.
>How-To-Repeat:
# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            xxx.xxx.xxx.81     UGSc        1        0      ep0
127.0.0.1          127.0.0.1          UH         15   665693      lo0
xxx.xxx.xxx.80/28  link#9             UC          0        0      ep0 =>
# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            xxx.xxx.xxx.81     UGSc        1        0      ep0
127.0.0.1          127.0.0.1          UH         15   665693      lo0
xxx.xxx.xxx.80/28  link#9             UC          0        0      ep0 =>
# ifconfig ep0 down
# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            xxx.xxx.xxx.81     UGSc        1        0      ep0
127.0.0.1          127.0.0.1          UH         15   665693      lo0
# route delete default
delete net default
# netstat -rn -f inet
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
127.0.0.1          127.0.0.1          UH         15   665693      lo0
# route add default xxx.xxx.xxx.81
add net default: gateway xxx.xxx.xxx.81
# route change default xxx.xxx.xxx.81
route: writing to routing socket: Disc quota exceeded
change net default: gateway xxx.xxx.xxx.81: Disc quota exceeded

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Jun 8 06:19:36 PDT 2001 
State-Changed-Why:  
This is the normal behavior of the route(8) command. 
Kernel just tells you that the gateway route could 
not be allocated for a route due to a misconfigured 
routing table.  I've put some explanations here: 

sbin/route/route.c,v 1.47 
sbin/route/route.8,v 1.25 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26833 
Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Jun 8 06:24:34 PDT 2001 
Responsible-Changed-Why:  
Mark as mine, for future references. 

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