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?