bgp_path.first

nixx nixxwork at gmail.com
Mon Aug 21 19:29:25 CEST 2017


Hello.

i'm trying to configure bird for working with uplinks and downlinks with
this example:
https://gitlab.labs.nic.cz/labs/bird/wikis/BGP_filtering

i'm using truncated function:

function rt_export()
{
  if proto = "static_bgp" then return true;
  if source != RTS_BGP then return false;
  return bgp_path.first ~ [ downlink1AS, downlink2AS ];
}

But this incorrectly works - bird trying to export my full-view to uplink.

Then, when i changed to

if ( bgp_path.len = 2 ) && ( bgp_path.first = myAS ) then return bgp_path ~
[ downlink1AS, downlink2AS ];

...it works.

What i'm (or my bird) doing wrong? Or maybe this example is not correct?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20170821/b55a559b/attachment.html>


More information about the Bird-users mailing list