64 lines
859 B
Text
64 lines
859 B
Text
function is_dn42() {
|
|
return net ~ [
|
|
172.20.0.0/14{21,29},
|
|
172.20.0.0/24{28,32}, # Anycast
|
|
172.21.0.0/24{28,32}, # Anycast
|
|
172.22.0.0/24{28,32}, # Anycast
|
|
172.23.0.0/24{28,32}, # Anycast
|
|
fd00::/8{44,64}
|
|
];
|
|
}
|
|
|
|
filter dn42_import_v4
|
|
bool rej;
|
|
{
|
|
accept;
|
|
|
|
rej = false;
|
|
|
|
if ! is_dn42() then
|
|
rej = true;
|
|
|
|
if is_rpki_invalid_dn42_v6() then
|
|
rej = true;
|
|
|
|
# We delay the final decission until all communities are added
|
|
if rej then
|
|
reject;
|
|
|
|
accept;
|
|
}
|
|
|
|
filter dn42_import_v6
|
|
bool rej;
|
|
{
|
|
accept;
|
|
|
|
rej = false;
|
|
|
|
if ! is_dn42() then
|
|
rej = true;
|
|
|
|
if is_rpki_invalid_dn42_v6() then
|
|
rej = true;
|
|
|
|
# We delay the final decission until all communities are added
|
|
if rej then
|
|
reject;
|
|
|
|
accept;
|
|
}
|
|
|
|
filter dn42_export_v4 {
|
|
if ! is_mine_dn42() then
|
|
reject;
|
|
|
|
accept;
|
|
}
|
|
|
|
filter dn42_export_v6 {
|
|
if ! is_mine_dn42() then
|
|
reject;
|
|
|
|
accept;
|
|
}
|