Static route preference incorrect for value 0

Ondrej Zajicek santiago at crfreenet.org
Tue Jan 14 16:39:38 CET 2020


On Tue, Jan 14, 2020 at 11:53:10AM +0000, Kenth Eriksson wrote:
> When setting preference value of zero on a static route, then this gets
> shown as preference 200 when doing show route. Preference on static
> routes is based on a patch from Ondrej with SHA
> 7a49e97e7ec86bd336dc801411cb8b8f92f38388, but it looks as this has
> still not made into master.
> 
> kenth ~ # cat /opt/appl/executing/etc/bird_route.conf 
> protocol static static1 { 
>     ipv4 {import all;};
>     check link 1;
>     route 0.0.0.0/0 via 10.210.137.1 {preference=0;};
> }
> 
> bird> show route 
> Table master4:
> 0.0.0.0/0      unicast [static1 12:27:07.093] (200)
> 	via 10.210.137.1 on eth1
> 
> Setting preference to a value >= 1 makes this work correct.

Hi

Preference value 0 is undefined in BIRD. It does not work even if set
using 'preference' keyword for whole protocol. Although it probably
should generate some warning/error.

Also, i do not remember which patch exactly i sent you, but i think
that proper syntax for multiple routes with different preference was
'preference X;', not 'preference=X;'. The second one is just generic
per-route filter code.

We planned to do some deeper review of static protocol code that improves
several issues including handling of multiple routes, so we did not
merged this small patches, but we did not managed that yet.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago at crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


More information about the Bird-users mailing list