ix-bird-config/filter6.conf

37 lines
823 B
Plaintext
Raw Normal View History

2018-09-22 10:51:14 +00:00
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
];
}
2018-10-13 18:56:18 +00:00
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() {
2018-11-11 19:23:42 +00:00
if (roa_check(dn42_roa, net, bgp_path.last) = ROA_INVALID) then {
print "[dn42] ROA check failed for ", net, " ASN ", bgp_path.last;
reject;
}
2018-10-13 18:56:18 +00:00
if(!import_filter_networks()) then return false;
2018-11-11 19:23:42 +00:00
}