From ed0e57e3f079352714c3a3a8a5b0dddf4aadfe1d Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 21 Apr 2021 22:34:12 +0300 Subject: bgpd: Create BGP alias names for community/large-community Show alias name instead of numerical value in `show bgp . 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 --- bgpd/bgp_memory.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bgpd/bgp_memory.c') diff --git a/bgpd/bgp_memory.c b/bgpd/bgp_memory.c index 36bdc05eb7..fc508496cc 100644 --- a/bgpd/bgp_memory.c +++ b/bgpd/bgp_memory.c @@ -65,6 +65,8 @@ DEFINE_MTYPE(BGPD, AS_LIST, "BGP AS list"); DEFINE_MTYPE(BGPD, AS_FILTER, "BGP AS filter"); DEFINE_MTYPE(BGPD, AS_FILTER_STR, "BGP AS filter str"); +DEFINE_MTYPE(BGPD, COMMUNITY_ALIAS, "community"); + DEFINE_MTYPE(BGPD, COMMUNITY, "community"); DEFINE_MTYPE(BGPD, COMMUNITY_VAL, "community val"); DEFINE_MTYPE(BGPD, COMMUNITY_STR, "community str"); -- cgit v1.2.3