<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Line 360 is the prefix_is_bogon if statement.<br>
<br>
The bogon lists can be seen from:
<a class="moz-txt-link-freetext" href="https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf#L36-L84">https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf#L36-L84</a><br>
<br>
-----------------------------------------------------------<br>
if prefix_is_bogon() then<br>
reject "prefix is bogon - REJECTING ", net;<br>
-----------------------------------------------------------<br>
function prefix_is_bogon() {<br>
if net.type = NET_IP4 then<br>
if net ~ BOGONS_4 then return true;<br>
if net.type = NET_IP6 then<br>
if net ~ BOGONS_6 then return true;<br>
return false;<br>
}<br>
-----------------------------------------------------------<br>
<br>
P.S Please do not reply to me directly, but to the list.<br>
</p>
<div class="moz-cite-prefix">On 13/08/2020 18.41, Maria Matějka
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:5D0C1990-ADDC-48EB-A1BD-B0A9EE8272EF@nic.cz">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
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" <a class="moz-txt-link-rfc2396E" href="mailto:sm@samip.fi"><sm@samip.fi></a> 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,
I'm using the template from
<a href="https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf" moz-do-not-send="true">https://github.com/neptune-networks/peering/blob/master/out/router.fqdn.example/bird.conf</a>
for my filters, and I'm getting argument related errors in logs.
What's the issue with those filters?
P.S I need to find a guide on how to do bird2 and RPKI as well.
Logs:<hr>2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction
FI_CONDITION must be of type T_BOOL, got 0x00
2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction
FI_CONDITION must be of type T_BOOL, got 0x00
2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction
FI_CONDITION must be of type T_BOOL, got 0x00
2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction
FI_CONDITION must be of type T_BOOL, got 0x00
2020-08-13 17:37:47 <ERR> filters, line 360: Argument 1 of instruction
FI_CONDITION must be of type T_BOOL, got 0x00
2020-08-13 17:37:47 <ERR> ...<hr>Bird config, the filter functions:<hr># --- Filters (technically functions) ---
function default_import() {
if bgp_path.len > 32 then
reject "AS_PATH len [", bgp_path.len ,"] longer than 32 - REJECTING
", net;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
if is_own_prefix() then
reject "prefix is our own - REJECTING ", net;
if is_own_internal_prefix() then {
if !prefix_is_in_global_whitelist() then
reject "prefix is our own and internal - REJECTING ", net;
}
if prefix_is_bogon() then
reject "prefix is bogon - REJECTING ", net;
if net.type = NET_IP4 then
if !is_prefix_length_valid(8, 24) then
reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;
if net.type = NET_IP6 then
if !is_prefix_length_valid(12, 56) then
reject "prefix len [", net.len, "] not in 12-56 - REJECTING ", net;
#perform_rpki_validation();
if route_is_rpki_invalid() then
reject "RPKI, route is INVALID - REJECTING ", net;
add_region_community();
add_site_community();
honor_graceful_shutdown();
accept;
}
function peer_import() {
scrub_communities_in();
add_peer_community();
default_import();
}
function peer_export() {
strip_private_asns();
add_global_prepends();
if is_own_prefix() then accept;
if route_is_rpki_invalid() then
reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;
if is_own_internal_prefix() then {
if !prefix_is_in_global_whitelist() then
reject "prefix is our own and internal - NOT ANNOUNCING ", net;
}
if net.type = NET_IP4 then
if !is_prefix_length_valid(8, 24) then
reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;
if net.type = NET_IP6 then
if !is_prefix_length_valid(12, 48) then
reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;
if prefix_is_bogon() then
reject "prefix is bogon - NOT ANNOUNCING ", net;
if as_path_contains_invalid_asn() then
reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING
", net;
if should_not_export_to_site() then
reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;
if should_not_export_to_region() then
reject "NO_EXPORT community in place for region - NOT ANNOUNCING ",
net;
if should_not_export_to_peers() then
reject "NO_EXPORT community in place for peers - NOT ANNOUNCING ", net;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
if was_learned_from_customer() then accept;
reject;
}
function upstream_import() {
scrub_communities_in();
add_upstream_community();
default_import();
}
function upstream_export() {
strip_private_asns();
add_global_prepends();
if is_own_prefix() then accept;
if route_is_rpki_invalid() then
reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;
if is_own_internal_prefix() then {
if !prefix_is_in_global_whitelist() then
reject "prefix is our own and internal - NOT ANNOUNCING ", net;
}
if net.type = NET_IP4 then
if !is_prefix_length_valid(8, 24) then
reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;
if net.type = NET_IP6 then
if !is_prefix_length_valid(12, 48) then
reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;
if prefix_is_bogon() then
reject "prefix is bogon - NOT ANNOUNCING ", net;
if as_path_contains_invalid_asn() then
reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING
", net;
if should_not_export_to_site() then
reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;
if should_not_export_to_region() then
reject "NO_EXPORT community in place for region - NOT ANNOUNCING ",
net;
if should_not_export_to_upstreams() then
reject "NO_EXPORT community in place for upstreams - NOT ANNOUNCING
", net;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
if was_learned_from_customer() then accept;
reject;
}
function customer_import() {
scrub_communities_in();
add_customer_community();
default_import();
}
function customer_export() {
strip_private_asns();
add_global_prepends();
if is_own_prefix() then accept;
if route_is_rpki_invalid() then
reject "RPKI, route is INVALID - NOT ANNOUNCING ", net;
if is_own_internal_prefix() then {
if !prefix_is_in_global_whitelist() then
reject "prefix is our own and internal - NOT ANNOUNCING ", net;
}
if net.type = NET_IP4 then
if !is_prefix_length_valid(8, 24) then
reject "prefix len [", net.len, "] not in 8-24 - REJECTING ", net;
if net.type = NET_IP6 then
if !is_prefix_length_valid(12, 48) then
reject "prefix len [", net.len, "] not in 12-48 - REJECTING ", net;
if prefix_is_bogon() then
reject "prefix is bogon - NOT ANNOUNCING ", net;
if as_path_contains_invalid_asn() then
reject "AS_PATH [", bgp_path ,"] contains invalid ASN - REJECTING
", net;
if should_not_export_to_site() then
reject "NO_EXPORT community in place for site - NOT ANNOUNCING ", net;
if should_not_export_to_region() then
reject "NO_EXPORT community in place for region - NOT ANNOUNCING ",
net;
if should_not_export_to_customers() then
reject "NO_EXPORT community in place for customers - NOT ANNOUNCING
", net;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
if was_learned_from_peer() then accept;
if was_learned_from_private_peer() then accept;
if was_learned_from_upstream() then accept;
if was_learned_from_customer() then accept;
reject;
}
function core_import() {
if prefix_is_bogon() then reject;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
honor_graceful_shutdown();
accept;
}
function core_export() {
if prefix_is_bogon() then reject;
if prefix_is_in_global_blacklist() then
reject "prefix is in global blacklist - REJECTING ", net;
if is_own_prefix() then accept;
if is_own_internal_prefix() then accept;
if was_learned_from_peer() then accept;
if was_learned_from_private_peer() then accept;
if was_learned_from_upstream() then accept;
if was_learned_from_customer() then accept;
reject;
}<hr>--
This email has been checked for viruses by Avast antivirus software.
<a href="https://www.avast.com/antivirus" moz-do-not-send="true">https://www.avast.com/antivirus</a>
</pre>
</blockquote>
</div>
<br>
-- <br>
Sent from my Android device with K-9 Mail. Please excuse my
brevity.
</blockquote>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">
<img border=0 src="https://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
This email has been checked for viruses by Avast antivirus software.
<br><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
<a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>