Date: Tue, 7 Sep 2004 20:44:24 +0200 (CEST) From: Thomas Quinot <thomas@cuivre.fr.eu.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/71474: route lookup does not skip interfaces marked down Message-ID: <20040907184424.0912D2C3D5@melusine.cuivre.fr.eu.org> Resent-Message-ID: <200409071850.i87IoMWm047098@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040907184424.0912D2C3D5>