From 158955709a77f41f3156dc135ebabd154e76ed00 Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 5 Jan 2023 00:41:54 +0800 Subject: [PATCH] update: filter --- lib/10-community-transit.conf | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/10-community-transit.conf b/lib/10-community-transit.conf index 01d39f9..63529ed 100644 --- a/lib/10-community-transit.conf +++ b/lib/10-community-transit.conf @@ -36,18 +36,18 @@ function pub_add_communities(int ASN; int PeerType) { } function pub_preprocess_communities() { - if (LOCAL_ASN, 115, 1) ~ bgp_large_community then bgp_path.prepend(bgp_path.last); + if (LOCAL_ASN, 115, 1) ~ bgp_large_community then bgp_path.prepend(LOCAL_ASN); if (LOCAL_ASN, 115, 3) ~ bgp_large_community then { - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); } if (LOCAL_ASN, 115, 5) ~ bgp_large_community then { - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); - bgp_path.prepend(bgp_path.last); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); + bgp_path.prepend(LOCAL_ASN); } # Finished (LOCAL_ASN, 115, *); return true;