From 33d9eb25032d12f342cb760c74e6d5d03bc4d22d Mon Sep 17 00:00:00 2001 From: 186526 Date: Thu, 12 Jan 2023 21:23:56 +0800 Subject: [PATCH] update irrdb filter --- .gitignore | 3 ++- lib/20-community-downstream.conf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 61e71e2..bd37ca1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -install.sh \ No newline at end of file +install.sh +ansible/hosts \ No newline at end of file diff --git a/lib/20-community-downstream.conf b/lib/20-community-downstream.conf index cadec90..0775319 100644 --- a/lib/20-community-downstream.conf +++ b/lib/20-community-downstream.conf @@ -1,6 +1,6 @@ function downstream_import_filter(int ASN) { if !is_valid() then return false; - if bgp_path.last !~ DOWNSTREAM_ASN then return false; + if delete(bgp_path, DOWNSTREAM_ASN).len != 0 then return false; pub_add_communities(ASN, 20); pub_preprocess_communities(); bgp_local_pref = 500 - bgp_path.len * 10;