<html><head></head><body>Hello!<br>The error message tells you that you are passing something strange to the condition on line 360. What do you have on line 360?<br>Maria<br><br><div class="gmail_quote">On August 13, 2020 4:46:12 PM GMT+02:00, "Skyler Mäntysaari" <sm@samip.fi> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi there,<br><br>I'm using the template from <br><a href="https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf">https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf</a> <br>for my filters, and I'm getting argument related errors in logs.<br><br>What's the issue with those filters?<br><br>P.S I need to find a guide on how to do bird2 and RPKI as well.<br><br>Logs:<hr>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction <br>FI_CONDITION must be of type T_BOOL, got 0x00<br>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction <br>FI_CONDITION must be of type T_BOOL, got 0x00<br>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction <br>FI_CONDITION must be of type T_BOOL, got 0x00<br>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction <br>FI_CONDITION must be of type T_BOOL, got 0x00<br>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction <br>FI_CONDITION must be of type T_BOOL, got 0x00<br>2020-08-13 17:37:47 <ERR> ...<hr>Bird config, the filter functions:<hr># --- Filters (technically functions) ---<br>function default_import() {<br> if bgp_path.len > 32 then<br> reject "AS_PATH len [", bgp_path.len ,"] longer than 32 - REJECTING <br>", net;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> if is_own_prefix() then<br> reject "prefix is our own - REJECTING ", net;<br><br> if is_own_internal_prefix() then {<br> if !prefix_is_in_global_whitelist() then<br> reject "prefix is our own and internal - REJECTING ", net;<br> }<br><br> if prefix_is_bogon() then<br> reject "prefix is bogon - REJECTING ", net;<br><br> if net.type = NET_IP4 then<br> if !is_prefix_length_valid(8, 24) then<br> reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;<br><br> if net.type = NET_IP6 then<br> if !is_prefix_length_valid(12, 56) then<br> reject "prefix len [", net.len, "] not in 12-56 - REJECTING ", net;<br><br> #perform_rpki_validation();<br><br> if route_is_rpki_invalid() then<br> reject "RPKI, route is INVALID - REJECTING ", net;<br><br> add_region_community();<br> add_site_community();<br> honor_graceful_shutdown();<br><br> accept;<br>}<br><br>function peer_import() {<br> scrub_communities_in();<br> add_peer_community();<br> default_import();<br>}<br><br>function peer_export() {<br> strip_private_asns();<br> add_global_prepends();<br><br> if is_own_prefix() then accept;<br><br> if route_is_rpki_invalid() then<br> reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;<br><br> if is_own_internal_prefix() then {<br> if !prefix_is_in_global_whitelist() then<br> reject "prefix is our own and internal - NOT ANNOUNCING ", net;<br> }<br><br> if net.type = NET_IP4 then<br> if !is_prefix_length_valid(8, 24) then<br> reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;<br><br> if net.type = NET_IP6 then<br> if !is_prefix_length_valid(12, 48) then<br> reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;<br><br> if prefix_is_bogon() then<br> reject "prefix is bogon - NOT ANNOUNCING ", net;<br><br> if as_path_contains_invalid_asn() then<br> reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING <br>", net;<br><br> if should_not_export_to_site() then<br> reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;<br><br> if should_not_export_to_region() then<br> reject "NO_EXPORT community in place for region - NOT ANNOUNCING ", <br>net;<br><br> if should_not_export_to_peers() then<br> reject "NO_EXPORT community in place for peers - NOT ANNOUNCING ", net;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> if was_learned_from_customer() then accept;<br><br> reject;<br>}<br><br>function upstream_import() {<br> scrub_communities_in();<br> add_upstream_community();<br> default_import();<br>}<br><br>function upstream_export() {<br> strip_private_asns();<br> add_global_prepends();<br><br> if is_own_prefix() then accept;<br><br> if route_is_rpki_invalid() then<br> reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;<br><br> if is_own_internal_prefix() then {<br> if !prefix_is_in_global_whitelist() then<br> reject "prefix is our own and internal - NOT ANNOUNCING ", net;<br> }<br><br> if net.type = NET_IP4 then<br> if !is_prefix_length_valid(8, 24) then<br> reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;<br><br> if net.type = NET_IP6 then<br> if !is_prefix_length_valid(12, 48) then<br> reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;<br><br> if prefix_is_bogon() then<br> reject "prefix is bogon - NOT ANNOUNCING ", net;<br><br> if as_path_contains_invalid_asn() then<br> reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING <br>", net;<br><br> if should_not_export_to_site() then<br> reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;<br><br> if should_not_export_to_region() then<br> reject "NO_EXPORT community in place for region - NOT ANNOUNCING ", <br>net;<br><br> if should_not_export_to_upstreams() then<br> reject "NO_EXPORT community in place for upstreams - NOT ANNOUNCING <br>", net;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> if was_learned_from_customer() then accept;<br><br> reject;<br>}<br><br>function customer_import() {<br> scrub_communities_in();<br> add_customer_community();<br> default_import();<br>}<br><br>function customer_export() {<br> strip_private_asns();<br> add_global_prepends();<br><br> if is_own_prefix() then accept;<br><br> if route_is_rpki_invalid() then<br> reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;<br><br> if is_own_internal_prefix() then {<br> if !prefix_is_in_global_whitelist() then<br> reject "prefix is our own and internal - NOT ANNOUNCING ", net;<br> }<br><br> if net.type = NET_IP4 then<br> if !is_prefix_length_valid(8, 24) then<br> reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;<br><br> if net.type = NET_IP6 then<br> if !is_prefix_length_valid(12, 48) then<br> reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;<br><br> if prefix_is_bogon() then<br> reject "prefix is bogon - NOT ANNOUNCING ", net;<br><br> if as_path_contains_invalid_asn() then<br> reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING <br>", net;<br><br> if should_not_export_to_site() then<br> reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;<br><br> if should_not_export_to_region() then<br> reject "NO_EXPORT community in place for region - NOT ANNOUNCING ", <br>net;<br><br> if should_not_export_to_customers() then<br> reject "NO_EXPORT community in place for customers - NOT ANNOUNCING <br>", net;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> if was_learned_from_peer() then accept;<br> if was_learned_from_private_peer() then accept;<br> if was_learned_from_upstream() then accept;<br> if was_learned_from_customer() then accept;<br><br> reject;<br>}<br><br>function core_import() {<br> if prefix_is_bogon() then reject;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> honor_graceful_shutdown();<br> accept;<br>}<br><br>function core_export() {<br> if prefix_is_bogon() then reject;<br><br> if prefix_is_in_global_blacklist() then<br> reject "prefix is in global blacklist - REJECTING ", net;<br><br> if is_own_prefix() then accept;<br> if is_own_internal_prefix() then accept;<br> if was_learned_from_peer() then accept;<br> if was_learned_from_private_peer() then accept;<br> if was_learned_from_upstream() then accept;<br> if was_learned_from_customer() then accept;<br><br> reject;<br>}<hr>-- <br>This email has been checked for viruses by Avast antivirus software.<br><a href="https://www.avast.com/antivirus">https://www.avast.com/antivirus</a><br><br></pre></blockquote></div><br>-- <br>Sent from my Android device with K-9 Mail. Please excuse my brevity.</body></html>