2023-01-09 14:46:30 +00:00
|
|
|
function pub_route_controller_specific() {
|
|
|
|
if 4837 ~ bgp_path && (200536, 120, 221) ~ bgp_large_community && REGION ~ [200..299] then bgp_local_pref = 114514;
|
2023-03-14 15:06:59 +00:00
|
|
|
if 4134 ~ bgp_path && (200536, 120, 222) ~ bgp_large_community && REGION ~ [200..299] then bgp_local_pref = 114514;
|
2023-02-06 08:45:41 +00:00
|
|
|
if 58453 ~ bgp_path && 2914 ~ bgp_path && (200536, 120, 401) ~ bgp_large_community then bgp_local_pref = 114514;
|
2023-01-20 08:16:21 +00:00
|
|
|
if 174 ~ bgp_path && 4837 ~ bgp_path && (200536, 120, 101) ~ bgp_large_community && REGION = 100 then bgp_local_pref = 114514;
|
2023-01-19 15:33:18 +00:00
|
|
|
if REGION = 400 && (200536, 121, 500) ~ bgp_large_community && (200536, 122, 410) ~ bgp_large_community then bgp_local_pref = bgp_local_pref + 6;
|
2023-01-20 08:39:28 +00:00
|
|
|
if REGION = 430 && (200536, 110, 10) ~ bgp_large_community && (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;
|
2023-03-11 04:57:40 +00:00
|
|
|
if REGION != 430 && (200536, 121, 430) ~ bgp_large_community && (200536, 122, 400) ~ bgp_large_community then bgp_local_pref = bgp_local_pref + 1;
|
2023-01-20 08:16:21 +00:00
|
|
|
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 * 3;
|
2023-01-27 19:23:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function pub_is_downstream_route() {
|
|
|
|
if delete(bgp_path, DOWNSTREAM_ASN).len != 0 then return false;
|
|
|
|
return true;
|
2023-01-09 14:46:30 +00:00
|
|
|
}
|