Some routes no longer getting flagged with 'GATEWAY' in fbsd >=8

Mack Nagashima freebsd at mackn.org
Mon Jun 17 18:50:17 UTC 2013


we're in the process of upgrading from fbsd 7 to 9 and noticed a change
in behavior that might be problematic for us.

We use quagga to establish bgp sessions with a router.  We have it set
to redistribute kernel routes.
Zebra seems to drop anything that doesn't have the 'GATEWAY' flag set on
a route.

Prior to fbsd8 this wasn't a problem.  Doing something like the
following worked fine in fbsd7:

ifconfig em0 inet 192.168.100.1/24
ifconfig lo0 inet 192.168.100.100/24 alias
route add -nostatic 192.168.100.100/32 192.168.100.1

in fbsd7 this would yield a route with the flags <UP,GATEWAY> according
to RTM_GET.
in fbsd8+ the same would yield a route with <UP> without the GATEWAY flag.

However the RTM_ADD for the 'route add' comes in with <UP,GATEWAY,DONE>
on fbsd8+ so quagga does add if it's up before the route gets added but
starting quagga after the route is added ignores it since it's missing
the GATEWAY flag once in the routing table.  (route delete also fails to
propagate to quagga since the GATEWAY flag is missing)

I assume this is all due to the networking overhaul in fbsd8 and perhaps
it no longer flags any route who's gateway is bound to ANY interface on
the box as a gateway.

So the ultimate question is..  is there a way to get the legacy behavior
and get them flagged with GATEWAY so zebra will see them or a better
solution with the way networking now works...  (i noticed that issuing a
'route change' of an existing route with the GATEWAY flag set seems to
work as it doesn't drop the flag when the gateway changes under it...)

Thanks in advance!

-mackn



More information about the freebsd-net mailing list