update
This commit is contained in:
42
bird/filter/unet_filter.conf
Normal file
42
bird/filter/unet_filter.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
function function_unet_import() {
|
||||
if !unet_is_valid_network() then return false;
|
||||
if is_unet_self_net() then return false;
|
||||
bgp_large_community.add((UNET_ASN,200,0));
|
||||
return true;
|
||||
}
|
||||
|
||||
function function_unet_export() {
|
||||
if !unet_is_valid_network() then reject;
|
||||
if source !~ [RTS_STATIC, RTS_BGP] then reject;
|
||||
if bgp_large_community !~ [(UNET_ASN, 200,0)] then reject;
|
||||
accept;
|
||||
}
|
||||
|
||||
function function_unet_only_import() {
|
||||
if !unet_is_valid_network_v4() then return false;
|
||||
if is_unet_self_net() then return false;
|
||||
bgp_large_community.add((UNET_ASN,200,0));
|
||||
return true;
|
||||
}
|
||||
|
||||
function function_unet_only_export() {
|
||||
if !unet_is_valid_network_v4() then return false;
|
||||
if source !~ [RTS_STATIC, RTS_BGP] then return false;
|
||||
if bgp_large_community !~ [(UNET_ASN, 200,0)] then return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function function_unet_ibgp_import() {
|
||||
if bgp_large_community ~ [(UNET_ASN, 1,*)] then return false;
|
||||
if !unet_is_valid_network() then return false;
|
||||
if is_unet_self_net() then return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
function function_unet_ibgp_export() {
|
||||
if bgp_large_community ~ [(UNET_ASN, 1,*)] then return false;
|
||||
if !unet_is_valid_network() then return false;
|
||||
if is_unet_self_net() then return false;
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user