Hello bird users, I just started to test bird 2.0 and converted the existing bird 1.6 configuration to bird 2.0. I compiled bird 2.0.0 on my fedora test VM and got it running. But when I use path prepending in BGP (the same way I did in 1.6) bird throws an error and does not export the route. Does anyone have the same problem? Thanks, Daniel Configuration: template bgp generic_bgp { local as 202739; enable route refresh on; keepalive time 10; hold time 30; } protocol bgp vultr from generic_bgp { neighbor 2001:19f0:ffff::1 as 64515; ipv6{ next hop self; import keep filtered; import filter upstream_as64515_in; export filter upstream_out_test; }; multihop 2; password "xxx"; } filter upstream_out_test { if net = 2001:678:1e0::/48 then { bgp_path.prepend(202739); bgp_path.prepend(202739); bgp_path.prepend(202739); bgp_path.prepend(202739); accept; } reject; } Log: Dec 20 17:47:51 bb1 bird[1370]: filters, line 110: Can't prepend to non-path
On Wed, Dec 20, 2017 at 06:11:42PM +0100, Daniel Czerwonk wrote:
Hello bird users,
I just started to test bird 2.0 and converted the existing bird 1.6 configuration to bird 2.0. I compiled bird 2.0.0 on my fedora test VM and got it running. But when I use path prepending in BGP (the same way I did in 1.6) bird throws an error and does not export the route. Does anyone have the same problem?
Hello The problem is related to the change that in BIRD 2.0.0, an export filter is called before BGP-specific export route modifications (including implicit ASN prepend), while in older versions it was after these route modifications. But i forgot to describe the change in the documentation and/or 2.0 migration guidelines, sorry. The side effect of the change is that when 'bgp_path.prepend(202739)' is called for non-BGP route, the bgp_path attribute is not yet defined. A workaround is to use something like: if !defined(bgp_path) then bgp_path.empty(); before the first prepend, which will define the bgp_path attribute, so it can be prepended. We will fix it to make prepend() automatically define the attribute if not defined. -- 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."
Hello Ondrej, thank you very much! :) I modified the filter using your workaround. The prefix is now exported with the correct AS path. Best regards, Daniel Diff: + if !defined(bgp_path) then { + bgp_path.empty; + } + Ondrej Zajicek wrote:
A workaround is to use something like:
if !defined(bgp_path) then bgp_path.empty();
participants (2)
-
Daniel Czerwonk -
Ondrej Zajicek