Date: Mon, 21 Mar 2011 17:37:38 GMT From: Vincent Miszczak <vmiszczak@ankama.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/155757: setfib behavior Message-ID: <201103211737.p2LHbcYX007114@red.freebsd.org> Resent-Message-ID: <201103211740.p2LHe7hC046457@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 155757 >Category: kern >Synopsis: setfib behavior >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Mar 21 17:40:07 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Vincent Miszczak >Release: 8.2 >Organization: Ankama >Environment: FreeBSD testQOS.ankama.lan 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Mon Mar 21 11:30:16 UTC 2011 root@testQOS.ankama.lan:/usr/src/sys/amd64/compile/QOSRouter amd64 >Description: Hi guys, I'm using the very undocumented command setfib to play with several routing tables for test purposes before production release. This command has at least 2 problems : The kernel I'm running have the followings running settings : net.my_fibnum: 0 net.add_addr_allfibs: 0 net.fibs: 2 I'm currently testing very simple things : I boot my machine, and I enter those commands : #Configure interface em4 testQOS# ifconfig em4 10.10.10.0/24 up #Delete automatically added route (btw is there any parameter to prevent this behavior?) testQOS# route delete 10.10.10.0/24 delete net 10.10.10.0 #Populate FIB#1 context. We have net.add_addr_allfibs set to 0, so this is not done automatically testQOS# setfib 1 route add 10.10.10.0/24 -interface em4 add net 10.10.10.0: gateway em4 #Try a ping to a host(it's alive) in FIB#1 context testQOS# setfib 1 ping 10.10.10.11 PING 10.10.10.11 (10.10.10.11): 56 data bytes ping: sendto: Invalid argument If I do the following : testQOS# ifconfig em4 10.10.10.0/24 up testQOS# setfib 1 route add 10.10.10.0/24 -interface em4 testQOS# setfib 1 ping 10.10.10.11 PING 10.10.10.11 (10.10.10.11): 56 data bytes 64 bytes from 10.10.10.11: icmp_seq=0 ttl=64 time=1.561 ms The only difference is that I'm not deleting the route from FIB#0 context. Second problem : #Configuring an interface from FIB#1 context then trying to ping testQOS# setfib 1 sh # ifconfig em4 10.10.10.72/24 up # ping 10.10.10.11 PING 10.10.10.11 (10.10.10.11): 56 data bytes ping: sendto: Invalid argument #Doing the same thing in FIB#0 context testQOS# setfib 0 sh # ifconfig em4 10.10.10.72/24 up # ping 10.10.10.11 PING 10.10.10.11 (10.10.10.11): 56 data bytes 64 bytes from 10.10.10.11: icmp_seq=0 ttl=64 time=1.481 ms So it seems FIB#1 context depends on FIB#0 context. Maybe I've missed something, but it seems to be a bug. Thank you >How-To-Repeat: Install a FreeBSD 8.2 AMD64, compile kernel with options : options IPFIREWALL options IPFIREWALL_FORWARD options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=250 options IPDIVERT options DUMMYNET options HZ=1000 options ROUTETABLES=2 Boot your machine Run commands given in "description" >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103211737.p2LHbcYX007114>