From 342dd0c6230a7d637a8dec08a5ca9c7b6eb148be Mon Sep 17 00:00:00 2001 From: mitesh Date: Fri, 27 Oct 2017 14:15:45 -0700 Subject: bgpd: advertise/withdraw type-5 routes upon user config CLI config for enabling/disabling type-5 routes router bgp vrf address-family l2vpn evpn [no] advertise loop through all the routes in VRF instance and advertise/withdraw all ip routes as type-5 routes in default instance. Signed-off-by: Mitesh Kanjariya --- lib/prefix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/prefix.c') diff --git a/lib/prefix.c b/lib/prefix.c index f1c25d24d9..9f13cb8bb1 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -1043,10 +1043,11 @@ static const char *prefixevpn2str(const struct prefix *p, char *str, int size) family = IS_EVPN_PREFIX_IPADDR_V4((struct prefix_evpn *)p) ? AF_INET : AF_INET6; - snprintf(str, size, "[%d]:[%u][%s]/%d", + snprintf(str, size, "[%d]:[%u][%s/%d]/%d", p->u.prefix_evpn.route_type, p->u.prefix_evpn.eth_tag, inet_ntop(family, &p->u.prefix_evpn.ip.ip.addr, buf, PREFIX2STR_BUFFER), + p->u.prefix_evpn.ip_prefix_length, p->prefixlen); } else { sprintf(str, "Unsupported EVPN route type %d", -- cgit v1.2.3