From 5b1de2c4b5579aad2c3230b3f01e86f99153ad43 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Thu, 13 Jun 2024 15:28:26 +0200 Subject: BGP: Breaking: Add IXP ID as param Also, add "peer" function --- roles/uvok_bird/files/clear_functions.conf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'roles') diff --git a/roles/uvok_bird/files/clear_functions.conf b/roles/uvok_bird/files/clear_functions.conf index f9e3c10..b0fda90 100644 --- a/roles/uvok_bird/files/clear_functions.conf +++ b/roles/uvok_bird/files/clear_functions.conf @@ -4,9 +4,10 @@ function clean_own_communities() { bgp_large_community.delete([(CLEARNET_ASN, *, *)]); } -function clearnet_import_ixp() { +function clearnet_import_ixp(int ixp_id) { clean_own_communities(); bgp_large_community.add((CLEARNET_ASN, LC_INFO, INFO_IXP_RS)); + bgp_large_community.add((CLEARNET_ASN, LC_IXP_ID, ixp_id)); } function clearnet_import_transit() { @@ -14,6 +15,11 @@ function clearnet_import_transit() { bgp_large_community.add((CLEARNET_ASN, LC_INFO, INFO_TRANSIT)); } +function clearnet_import_peer() { + clean_own_communities(); + bgp_large_community.add((CLEARNET_ASN, LC_INFO, INFO_PEER)); +} + function clearnet_is_ixp() { if (CLEARNET_ASN, LC_INFO, INFO_IXP_RS) ~ bgp_large_community then { return true; -- cgit v1.2.3