Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jan 2014 17:18:23 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        current@FreeBSD.org
Subject:   interesting routing bug...
Message-ID:  <20140109011823.GI99167@funkthat.com>

next in thread | raw e-mail | index | archive | help
Well, I was trying to manually add a route for a host on the local
network (I can explain why, but it doesn't matter) and I got this:
# netstat -rnfinet
Routing tables

Internet:
Destination        Gateway            Flags    Netif Expire
default            192.168.0.14       UGS       re0
127.0.0.1          link#3             UH        lo0
192.168.0.0/24     link#1             U         re0
192.168.0.21       link#1             UHS       lo0
# route add -host 192.168.0.254 -interface re0 -link 04:4a:31:d3:95:dc
add net 192.168.0.254: gateway re0
# netstat -rnfinet
Routing tables

Internet:
Destination        Gateway            Flags    Netif Expire
0.0.0.0&0x20500    90:2b:34:ab:bb:85  US        re0
default            192.168.0.14       UGS       re0
10.0.0.0/8         link#2             U        msk0
10.42.42.21        link#2             UHS       lo0
127.0.0.1          link#3             UH        lo0
192.168.0.0/24     link#1             U         re0
192.168.0.21       link#1             UHS       lo0
# route delete 0.0.0.0
delete net 0.0.0.0
# route flush
::                   localhost            -fib 0   done
::ffff:0.0.0.0       localhost            -fib 0   done
fe80::               localhost            -fib 0   done
ff02::               localhost            -fib 0   done
# netstat -rnfinet
Routing tables

Internet:
Destination        Gateway            Flags    Netif Expire
0.0.0.0&0x20500    90:2b:34:ab:bb:85  US        re0
127.0.0.1          link#3             UH        lo0
192.168.0.0/24     link#1             U         re0
192.168.0.21       link#1             UHS       lo0

So, as you can see, I have managed to add a bogus route w/o a way
to remove it short of rebooting the box...  And because of this route,
some hosts like svn0.us-west.freebsd.org will match causing the machine
to try to find the ip on the local network.

This route I assume should be rejected by the kernel and not added,
or there is a mismatch between the route program and how the kernel
understands it.

I can provide more information upon request.

Thanks.

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



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