Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2014 19:45:55 GMT
From:      Alan Somers <asomers@freebsd.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/187552: default route uses the wrong interface when multiple interfaces have the same subnet but different fibs
Message-ID:  <201403131945.s2DJjt8V094001@cgiserv.freebsd.org>
Resent-Message-ID: <201403131950.s2DJo0ZH036345@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         187552
>Category:       kern
>Synopsis:       default route uses the wrong interface when multiple interfaces have the same subnet but different fibs
>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:   Thu Mar 13 19:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Alan Somers
>Release:        11.0-CURRENT  r262867
>Organization:
Spectra Logic
>Environment:
FreeBSD alans-fbsd-head 11.0-CURRENT FreeBSD 11.0-CURRENT #39 r263109M: Thu Mar 13 11:31:56 MDT 2014     alans@ns1.eng.sldomain.com:/vmpool/obj/usr/home/alans/freebsd/head/sys/GENERIC  amd64
>Description:
If multiple interfaces share the same subnet but different fibs, and they both have default routes, then the second and subsequent default routes will erroneously use the same interface as the first default route.  Instead, each default route should use the interface associated with its fib.
>How-To-Repeat:
# ifconfig tap0 create
# ifconfig tap1 create
# setfib 2 ifconfig tap0 192.0.2.2/24 fib 2
# setfib 3 ifconfig tap1 192.0.2.3/24 fib 3
# setfib 2 netstat -rn -f inet
Routing tables (fib: 2)

Internet:
Destination        Gateway            Flags    Netif Expire
default            192.0.2.1          UGS      tap0
192.0.2.0/24       link#3             U        tap0
# setfib 3 netstat -rn -f inet
Routing tables (fib: 3)

Internet:
Destination        Gateway            Flags    Netif Expire
default            192.0.2.1          UGS      tap0


Notice that the default route uses tap0 in both fibs.  It should use tap1 in fib 3.
>Fix:
Working on a patch ...

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403131945.s2DJjt8V094001>