summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_main.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-04-21 21:34:12 +0200
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-05-05 15:37:00 +0200
commited0e57e3f079352714c3a3a8a5b0dddf4aadfe1d (patch)
tree8c9cc817cb849107898633eb5d1d3201135fba10 /bgpd/bgp_main.c
parentMerge pull request #8619 from donaldsharp/sharp_redistribute (diff)
downloadfrr-ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d.tar.xz
frr-ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d.zip
bgpd: Create BGP alias names for community/large-community
Show alias name instead of numerical value in `show bgp <prefix>. E.g.: ``` root@exit1-debian-9:~/frr# vtysh -c 'sh run' | grep 'bgp community alias' bgp community alias 65001:123 community-1 bgp community alias 65001:123:1 lcommunity-1 root@exit1-debian-9:~/frr# ``` ``` exit1-debian-9# sh ip bgp 172.16.16.1/32 BGP routing table entry for 172.16.16.1/32, version 21 Paths: (2 available, best #2, table default) Advertised to non peer-group peers: 65030 192.168.0.2 from home-spine1.donatas.net(192.168.0.2) (172.16.16.1) Origin incomplete, metric 0, valid, external, best (Neighbor IP) Community: 65001:12 65001:13 community-1 65001:65534 Large Community: lcommunity-1 65001:123:2 Last update: Fri Apr 16 12:51:27 2021 exit1-debian-9# ``` Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r--bgpd/bgp_main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index ea74a82ce..995917b6b 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -66,6 +66,7 @@
#include "bgpd/bgp_evpn_mh.h"
#include "bgpd/bgp_nht.h"
#include "bgpd/bgp_routemap_nb.h"
+#include "bgpd/bgp_community_alias.h"
#ifdef ENABLE_BGP_VNC
#include "bgpd/rfapi/rfapi_backend.h"
@@ -220,6 +221,9 @@ static __attribute__((__noreturn__)) void bgp_exit(int status)
/* reverse bgp_dump_init */
bgp_dump_finish();
+ /* BGP community aliases */
+ bgp_community_alias_finish();
+
/* reverse bgp_route_init */
bgp_route_finish();