Hello, we noticed something which feels like an inconsistency/bug to us. So far we assumed that route attributes can be set in any filter of any protocol. But it seems like OSPF attributes can be set only in export filters of OSPF protocols. Here's an example configuration (Tested with BIRD 1.4.3): protocol static s_attr_test { import filter { bgp_community.add((65535,65281)); # working bgp_local_pref = 99; # working ospf_metric1=11; # not working ospf_metric2=12; # not working ospf_tag=123; # not working accept; }; route 10.50.0.0/30 via "lo"; } This is the result: # birdc show route all protocol s_attr_test BIRD 1.4.3 ready. 10.50.0.0/30 dev lo [s_attr_test 2014-06-20 12:35:25] * (200) Type: static-device unicast univ BGP.local_pref: 99 BGP.community: (65535,65281) As you can see the BGP attributes have been added correctly but the OSPF attributes are missing. Before we look further into this we would like to know if this is the intended behavior. Best Regards, Frederik Kriewitz
On Fri, Jun 20, 2014 at 01:45:47PM +0200, Frederik Kriewitz wrote:
Hello,
we noticed something which feels like an inconsistency/bug to us.
So far we assumed that route attributes can be set in any filter of any protocol. But it seems like OSPF attributes can be set only in export filters of OSPF protocols.
Hello This is known inconsistency/quirk. It is is a result of current attribute implementation (where EAF_EMBEDDED attributes are stored directly in struct rte instead of in extended attribute list). Redesign of embedded attributes (to fix this problem and also to simplify it) is in my todo list. The current behavior is that regular attributes (e.g. ones from BGP) could be set anywhere, while embedded attributes (ones from OSPF, RIP and KRT) could be set either in export filter to 'their' protocol, or anywhere for 'their' routes (i.e. you could set ospf_metric1 anywhere for route received from OSPF, with source == RTS_OSPF, but that is probably not much useful). -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
participants (2)
-
Frederik Kriewitz -
Ondrej Zajicek