ix-bird-config/filter6.conf

33 lines
705 B
Plaintext

function is_self_net() {
return net ~ [fd62:77fb:94bf::/48+];
}
function is_valid_network() {
return net ~ [
fd00::/8{44,64} # ULA address space as per RFC 4193
];
}
roa table dn42_roa {
include "/var/lib/bird/bird6_roa_dn42.conf";
};
function check_roa() {
if (roa_check(dn42_roa, net, bgp_path.last) = ROA_INVALID) then {
print "[dn42] ROA check failed for ", net, " ASN ", bgp_path.last;
return false;
}
return true;
}
function import_filter_networks() {
if is_valid_network() && !is_self_net() then {
return true;
}
return false;
}
function dn42peer_import_policy() {
if(!check_roa()) then return false;
if(!import_filter_networks()) then return false;
}