Hello! I'd try: * "show route noexport all" to see what may be the reason to drop the route * add some logging to the filter to see why it is dropped
BTW, what version are you using? As far as I remember, the BGP attributes are behaving differently on export in 1.6 and 2.0 Maria On June 6, 2021 5:24:38 AM GMT+02:00, "智慧雨泽" <zhihuiy...@gmail.com> wrote: >Hi,The function i wrote correctly returns net. > >bird> show route 2602:feda:ab2::/48 where bgp_export_all() >Table master6: >2602:feda:ab2::/48 unicast [LL_IX 02:19:31.236] * (100) [i] > via 2602:feda:ab2::1 on ll-ix > >But it could be export. >bird> show route export TOHU_IX for 2602:feda:ab2::/48 >bird> > >I think that should be accept >export filter { >if bgp_export_all() then accept; ># if (roa_check(r6, net, bgp_path.last_nonaggregated) ~ [ROA_INVALID, >ROA_UNKNOWN]) then reject; ># if is_bogon_asn() then reject; ># if is_bogon_prefix() then reject; ># accept; >}; >}; >} >Why is it not exported? >The full configuration is. > >protocol bgp TOHU_IX { >local as LOCAL_ASN; >description "tohu ix IX-VPS BGP"; >direct; >source address 2602:feda:ab5::1; >neighbor 2602:feda:ab6::1%'tuhu-ix' as 141011; >ipv6 { >next hop self; >import filter { >if is_bogon_asn() then reject; >if is_bogon_prefix() then reject; >if (roa_check(r6, net, bgp_path.last_nonaggregated) = ROA_VALID) then >reject >; >accept; >}; >export filter { >if bgp_export_all() then accept; ># if (roa_check(r6, net, bgp_path.last_nonaggregated) ~ [ROA_INVALID, >ROA_UNKNOWN]) then reject; ># if is_bogon_asn() then reject; ># if is_bogon_prefix() then reject; ># accept; >}; >}; >} > > >function bgp_export() { >if net !~ OUR_PREFIXES then return false; >if is_bogon_asn() then return false; >if is_bogon_prefix() then return false; >if net_len_too_long() then { ># print "net ", net, " prefix too long"; >return false; >} >if proto = "BGP_Prefix" then return true; >if proto = "LL_IX" then{ >if bgp_path.len = 0 then{ >return true; >} >} >if proto = "TOHU_IX" then{ >if bgp_path.len = 0 then{ >return true; >} >} >return false; >} > > >function bgp_export_all() { >if bgp_export() then { >return true; >} > >if source != RTS_BGP then{ >return false; >} >if is_bogon_asn() then return false; >if is_bogon_prefix() then return false; >return true; >}