From 61167cba6d4142ee7f1121511446cb8446da7870 Mon Sep 17 00:00:00 2001 From: 186526 Date: Sun, 1 Jan 2023 03:23:34 +0800 Subject: [PATCH] Update: update filter --- lib/20-community-net186.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/20-community-net186.conf b/lib/20-community-net186.conf index 8246744..7bcabdc 100644 --- a/lib/20-community-net186.conf +++ b/lib/20-community-net186.conf @@ -12,11 +12,11 @@ function net186_import_filter(int POPID) viaRegion = 0; # Route is via Europe & Africa & Middle East - if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600)] then viaRegion = viaRegion + 1; - # Route is via America - if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299)] then viaRegion = viaRegion + 1; - # Route is via East Asia & Oceania - if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500)] then viaRegion = viaRegion + 1; + if bgp_large_community ~ [(LOCAL_ASN, 122, 100), (LOCAL_ASN, 122, 300..310), (LOCAL_ASN, 122, 600), (LOCAL_ASN, 121, 100), (LOCAL_ASN, 121, 300..310), (LOCAL_ASN, 121, 600)] then viaRegion = viaRegion + 1; + # Route is via or locate America + if bgp_large_community ~ [(LOCAL_ASN, 122, 200..299), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1; + # Route is via or locate East Asia & Oceania + if bgp_large_community ~ [(LOCAL_ASN, 122, 400..500), (LOCAL_ASN, 121, 200..299)] then viaRegion = viaRegion + 1; if viaRegion >= 2 then bgp_local_pref = bgp_local_pref - 50 * viaRegion;