From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 7 18:50:22 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B04AC16A4D1 for ; Tue, 7 Sep 2004 18:50:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 841B843D1F for ; Tue, 7 Sep 2004 18:50:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i87IoMR9047099 for ; Tue, 7 Sep 2004 18:50:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i87IoMWm047098; Tue, 7 Sep 2004 18:50:22 GMT (envelope-from gnats) Resent-Date: Tue, 7 Sep 2004 18:50:22 GMT Resent-Message-Id: <200409071850.i87IoMWm047098@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas Quinot Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC61B16A4CE for ; Tue, 7 Sep 2004 18:44:25 +0000 (GMT) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6200043D68 for ; Tue, 7 Sep 2004 18:44:25 +0000 (GMT) (envelope-from thomas@cuivre.fr.eu.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 0912D2C3D5; Tue, 7 Sep 2004 20:44:24 +0200 (CEST) Message-Id: <20040907184424.0912D2C3D5@melusine.cuivre.fr.eu.org> Date: Tue, 7 Sep 2004 20:44:24 +0200 (CEST) From: Thomas Quinot To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: kern/71474: route lookup does not skip interfaces marked down X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thomas Quinot List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 18:50:22 -0000 >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: