Fix: error priority in bird.conf
This commit is contained in:
@ -1,35 +0,0 @@
|
||||
include "./constant.conf";
|
||||
|
||||
function pub_is_invalid_net_length(){
|
||||
case net.type {
|
||||
NET_IP4: return net.len > 24;
|
||||
NET_IP6: return net.len > 48;
|
||||
else: print "pub_is_valid_net_length: unexpected net.type ", net.type, " ", net; return false;
|
||||
}
|
||||
}
|
||||
|
||||
function is_bogon_prefix() {
|
||||
case net.type {
|
||||
NET_IP4: return net ~ BOGON_PREFIXES_V4;
|
||||
NET_IP6: return net ~ BOGON_PREFIXES_V6;
|
||||
else: print "is_bogon_prefix: unexpected net.type ", net.type, " ", net; return false;
|
||||
}
|
||||
}
|
||||
|
||||
function is_bogon_asn() {
|
||||
if bgp_path ~ BOGON_ASNS then return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_downstream_asn() {
|
||||
if bgp_path.last ~ DOWNSTREAM_ASN then return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function is_valid() {
|
||||
if pub_is_invalid_net_length() then return false;
|
||||
if is_bogon_prefix() then return false;
|
||||
if is_bogon_asn() then return false;
|
||||
if is_rpki_invalid() then return false;
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user