Revert "debug"

This reverts commit ec5c9ff353.
This commit is contained in:
2026-04-18 16:42:27 +08:00
parent ec5c9ff353
commit 682fb1b033
3 changed files with 19 additions and 9 deletions

View File

@@ -4,17 +4,18 @@
function function_inet_bgp_export_to_upstream1() {
if source !~ [RTS_STATIC, RTS_BGP] then return false;
if is_bogon_prefix() then return false;
if bgp_large_community !~ [(LOCAL_ASN, 200, 0)] then return false;
# 100禁止性过滤
if bgp_large_community ~ [(LOCAL_ASN, 100, 100)] then return false;
if bgp_large_community ~ [(LOCAL_ASN, 100, 200)] then return false;
if bgp_large_community ~ [(LOCAL_ASN, 200, 202)] then return false;
if source =RTS_STATIC then {
if source !~ [RTS_STATIC] then {
# 静态路由,允许 200[0 2]
if bgp_large_community ~ [(LOCAL_ASN, 200, 0)] then return true;
if bgp_large_community ~ [(LOCAL_ASN, 200, 2)] then return true;
if bgp_large_community ~ [(LOCAL_ASN, 200, 1)] then return false;
}
if source = RTS_BGP then {
if source !~ [RTS_BGP] then {
# BGP路由允许 3000
if bgp_large_community ~ [(LOCAL_ASN, 300, 0)] then return true;
}