From owner-freebsd-bugs@FreeBSD.ORG Mon Apr 28 22:30:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 898689DE for ; Mon, 28 Apr 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6531C1984 for ; Mon, 28 Apr 2014 22:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SMU0ri022557 for ; Mon, 28 Apr 2014 22:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3SMU0uP022556; Mon, 28 Apr 2014 22:30:00 GMT (envelope-from gnats) Resent-Date: Mon, 28 Apr 2014 22:30:00 GMT Resent-Message-Id: <201404282230.s3SMU0uP022556@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, Alan Somers Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBEDF94B for ; Mon, 28 Apr 2014 22:24:31 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A87D8193F for ; Mon, 28 Apr 2014 22:24:31 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3SMOVcv021046 for ; Mon, 28 Apr 2014 22:24:31 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3SMOVCV021040; Mon, 28 Apr 2014 22:24:31 GMT (envelope-from nobody) Message-Id: <201404282224.s3SMOVCV021040@cgiserv.freebsd.org> Date: Mon, 28 Apr 2014 22:24:31 GMT From: Alan Somers To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/189088: Assigning the same IP to multiple interfaces in different FIBs creates a host route for only one. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2014 22:30:00 -0000 >Number: 189088 >Category: kern >Synopsis: Assigning the same IP to multiple interfaces in different FIBs creates a host route for only one. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 28 22:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Alan Somers >Release: 11.0 CURRENT >Organization: Spectra Logic >Environment: FreeBSD alans-fbsd-head 11.0-CURRENT FreeBSD 11.0-CURRENT #55 r265061M: Mon Apr 28 15:08:01 MDT 2014 alans@ns1.eng.sldomain.com:/vmpool/obj/usr/home/alans/freebsd/head/sys/GENERIC amd64 >Description: Assigning the same IP to multiple interfaces simultaneously sounds insane, but some people do it. However, if you assign them to separate FIBs as well as separate interfaces, bad stuff happens. For one thing, only the first FIB used will get a host route. For another, if you delete the addresses in FIFO order the host route will never get deleted (though it will if you delete them in LIFO order). >How-To-Repeat: On a system with net.add_addr_allfibs=0 and net.fibs=4, Run the following commands: # ifconfig tap0 create # ifconfig tap1 create # ifconfig tap0 192.0.2.2/32 fib 2 # ifconfig tap1 192.0.2.2/32 fib 3 # setfib 2 netstat -rn -f inet Routing tables (fib: 2) Internet: Destination Gateway Flags Netif Expire 192.0.2.2 link#3 UHS lo0 192.0.2.2/32 link#3 U tap0 # setfib 3 netstat -rn -f inet Routing tables (fib: 3) Internet: Destination Gateway Flags Netif Expire 192.0.2.2/32 link#4 U tap1 Notice that FIB 3 does not get a 192.0.2.2 host route. Now try deleting the addresses in FIFO order: # ifconfig tap0 -alias 192.0.2.2 # ifconfig tap1 -alias 192.0.2.2 # setfib 2 netstat -rn -f inet Routing tables (fib: 2) Internet: Destination Gateway Flags Netif Expire 192.0.2.2 link#4 UHS lo0 >Fix: >Release-Note: >Audit-Trail: >Unformatted: