This commit is contained in:
2026-06-05 16:10:46 +08:00
parent 420250832e
commit 2991b41762
5 changed files with 8 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
function function_dn42_ibgp_import() {
bgp_large_community.delete((DN42_ASN,3,1));
bgp_large_community.delete((DN42_ASN,3,0));
if is_dn42_self_net() then return false;
if !is_dn42_prefix() then return false;
if bgp_large_community ~ [(DN42_ASN, 1,*)] then return false;
@@ -7,7 +7,7 @@ function function_dn42_ibgp_import() {
}
function function_dn42_ibgp_export() {
bgp_large_community.delete((DN42_ASN,3,1));
bgp_large_community.delete((DN42_ASN,3,0));
if is_dn42_self_net() then return false;
if !is_dn42_prefix() then return false;
if bgp_large_community ~ [(DN42_ASN, 1,*)] then return false;

View File

@@ -16,7 +16,7 @@ function function_dn42_bgp_export_to_upstream1() {
}
if source = RTS_BGP then {
# BGP路由允许 3000
if bgp_large_community ~ [(DN42_ASN, 300, 0)] then return true;
if bgp_large_community ~ [(DN42_ASN, 10100, 4)] then return true;
}
return false;
}

View File

@@ -1,5 +1,5 @@
function function_inet_ibgp_import() {
bgp_large_community.delete((LOCAL_ASN,3,1));
bgp_large_community.delete((LOCAL_ASN,3,0));
if is_self_net() then return false;
if is_bogon_prefix() then return false;
if bgp_large_community ~ [(LOCAL_ASN, 1,*)] then return false;
@@ -7,7 +7,7 @@ function function_inet_ibgp_import() {
}
function function_inet_ibgp_export() {
bgp_large_community.delete((LOCAL_ASN,3,1));
bgp_large_community.delete((LOCAL_ASN,3,0));
if is_self_net() then return false;
if is_bogon_prefix() then return false;
if bgp_large_community ~ [(LOCAL_ASN, 1,*)] then return false;

View File

@@ -15,8 +15,7 @@ function function_inet_bgp_export_to_upstream1() {
if bgp_large_community ~ [(LOCAL_ASN, 200, 1)] then return false;
}
if source = RTS_BGP then {
# BGP路由允许 3000
if bgp_large_community ~ [(LOCAL_ASN, 300, 0)] then return true;
if bgp_large_community ~ [(LOCAL_ASN, 10100, 4)] then return true;
}
return false;
}