From df42f0926fde55c861b6161ded2c746f798c2a73 Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 19 Jan 2023 23:33:18 +0800 Subject: [PATCH] Update filter for sin 2 syd --- lib/10-community-controller.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/10-community-controller.conf b/lib/10-community-controller.conf index d8a027f..2175028 100644 --- a/lib/10-community-controller.conf +++ b/lib/10-community-controller.conf @@ -1,3 +1,6 @@ function pub_route_controller_specific() { if 4837 ~ bgp_path && (200536, 120, 221) ~ bgp_large_community && REGION ~ [200..299] then bgp_local_pref = 114514; + if REGION = 400 && (200536, 121, 500) ~ bgp_large_community && (200536, 122, 410) ~ bgp_large_community then bgp_local_pref = bgp_local_pref + 6; + if REGION = 430 && (200536, 121, 430) !~ bgp_large_community && ((200536, 121, 400) ~ bgp_large_community || (200536, 122, 400) ~ bgp_large_community) then bgp_local_pref = bgp_local_pref + 30; + if REGION != 430 && (200536, 121, 430) ~ bgp_large_community then bgp_local_pref = bgp_local_pref + filter(bgp_large_community, [(LOCAL_ASN, 122, 430)]).len * 5; } \ No newline at end of file