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

Ruslan Ermilov ru at
Wed Sep 8 05:50:25 PDT 2004

The following reply was made to PR kern/71474; it has been noted by GNATS.

From: Ruslan Ermilov <ru at>
To: Thomas Quinot <thomas at>
Cc: bug-followup at
Subject: Re: kern/71474: route lookup does not skip interfaces marked down
Date: Wed, 8 Sep 2004 15:49:26 +0300

 On Wed, Sep 08, 2004 at 02:26:29PM +0200, Thomas Quinot wrote:
 > * Ruslan Ermilov, 2004-09-08 :
 > >  But your test case only applies to P2P interfaces, when both ends
 > >  of two P2P interfaces share the same IP address.
 > No, this is not the case. Only the remote ends of the two interfaces
 > share the same IP address. I described that test case because using gif
 > interfaces makes it easier to reproduce, but I initially observed this
 > symptom with one bge and one Intel wireless (ndis) interface.
 That's what I meant (two remote ends of both interfaces).
 > >  I do not see how this could apply to broadcast interfaces.
 > As follows. Consider a machine with two Ethernet interfaces I1 and I2.
 > ifconfig I1 netmask
 > ifconfig I1 down
 > ifconfig I2 netmask
 > route add default
 > The default route will be set to on I1, not on I2 as
 > expected.
 It's still a misconfiguration -- if you do not bring the I1 interface
 down, the "interface" route for I2 will not be installed, and the
 ifconfig(8) command will be aborted.  Anyway...
 I reproduced this with two ng_eiface(4) nodes.  There's still a useful
 option in the route(8) utility -- you can supply an explicit reference
 to the interface, like this:
 : route add default -ifp I1
 This is also vaguely documented in the route(8) manpage, FWIW:
 : In a change or add command where the destination and gateway are not suf-
 : ficient to specify the route ..., the -ifp or -ifa modifiers may be used
 : to determine the interface or interface address.
 Ruslan Ermilov
 ru at
 FreeBSD committer

More information about the freebsd-bugs mailing list