kern/71474: route lookup does not skip interfaces marked down

Thomas Quinot thomas at cuivre.fr.eu.org
Tue Sep 7 11:50:22 PDT 2004


>Number:         71474
>Category:       kern
>Synopsis:       route lookup does not skip interfaces marked down
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 07 18:50:22 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Quinot
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD malevil.act-europe.fr 5.2-CURRENT FreeBSD 5.2-CURRENT #1: Mon Aug  2 16:09:18 CEST 2004     root at alexandria.act-europe.fr:/usr/obj/usr/src/HEAD/sys/ADACORE  i386

	
>Description:
	When a route is set, the interface corresponding to the destination
	hop is looked up among all existing interfaces, not only those that
	are marked up, causing the wrong interface to be selected in some cases.
>How-To-Repeat:
	This issue can be demonstrated using gif interfaces:

	# ifconfig gif0 create
	# ifconfig gif0 192.168.0.254 192.168.0.1
	# ifconfig gif0 down
	# ifconfig gif1 create
	# ifconfig gif1 192.168.0.253 192.168.0.1

	Note at this point that 192.168.0.1 is reachable through interface
	gif1.

	# route add 192.168.1.0 192.168.0.1
	# netstat -rn | grep 192.168
	192.168.0.1        192.168.0.253      UH          1        0   gif1
	192.168.1          192.168.0.1        UGS         0        0   gif0

	Note then that, even though 192.168.0.1 is marked as reachable through
	gif1, for the purpose of routing to 192.168.1.0 the selected interface
	is gif0 (which is down).

>Fix:

	Fix not determined yet. This problem can be worked around by
	changing the addresses on the down interface so it won't clash
	with those of the up one:

	# ifconfig gif0 192.168.99.1 192.168.99.2
	# ifconfig gif0 down
	# route delete 192.168.1.0 192.168.0.1
	# route add 192.168.1.0 192.168.0.1
	# netstat -rn | grep 192.168
	192.168.0.1        192.168.0.253      UH          1        0   gif1
	192.168.1          192.168.0.1        UGS         0        0   gif1

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list