From 4a00d501448d9a9f5a4ae06eaf828cabb76247cf Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 9 Feb 2023 04:37:42 +0800 Subject: [PATCH] update --- ansible | 2 +- lib/20-community-net186.conf | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ansible b/ansible index 7a15133..9e8f3f2 160000 --- a/ansible +++ b/ansible @@ -1 +1 @@ -Subproject commit 7a151339890f07698fe8f61f4edff8b2a6469769 +Subproject commit 9e8f3f2707b0ee53c3b23656efaa89db9aae0138 diff --git a/lib/20-community-net186.conf b/lib/20-community-net186.conf index a67924b..e8bf9f9 100644 --- a/lib/20-community-net186.conf +++ b/lib/20-community-net186.conf @@ -6,7 +6,8 @@ function net186_import_filter(int POPID) if (LOCAL_ASN, 122, REGION) !~ bgp_large_community then bgp_large_community.add((LOCAL_ASN, 122, REGION)); - if bgp_large_community ~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 2), (LOCAL_ASN, 110, 20)] then bgp_local_pref = 500; + if public_bgp_path.len = 1 then bgp_local_pref = 550; + else if bgp_large_community ~ [(LOCAL_ASN, 110, 0), (LOCAL_ASN, 110, 2), (LOCAL_ASN, 110, 20)] then bgp_local_pref = 500; else if bgp_large_community ~ [(LOCAL_ASN, 110, 1), (LOCAL_ASN, 110, 10)] then bgp_local_pref = 400; else bgp_local_pref = 300;