From 8228a9a7a5f915835bc00ef829be761269ec1826 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Wed, 14 Oct 2020 11:07:57 -0400 Subject: bgpd: Convert to %pFX or %pBD where possible Search and destroy places where we used prefix2str that could be replaced with %pFX or %pBD in bgpd. Signed-off-by: Donald Sharp --- bgpd/bgp_zebra.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'bgpd/bgp_zebra.c') diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index a32e47f44..1ee8a1a50 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -944,10 +944,8 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p, if (p->family == AF_INET) { char buf[2][INET_ADDRSTRLEN]; zlog_debug( - "Zebra rmap deny: IPv4 route %s/%d nexthop %s", - inet_ntop(AF_INET, &p->u.prefix4, buf[0], - sizeof(buf[0])), - p->prefixlen, + "Zebra rmap deny: IPv4 route %pFX nexthop %s", + p, inet_ntop(AF_INET, &path->attr->nexthop, buf[1], sizeof(buf[1]))); } @@ -958,12 +956,10 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p, nexthop = bgp_path_info_to_ipv6_nexthop(path, &ifindex); zlog_debug( - "Zebra rmap deny: IPv6 route %s/%d nexthop %s", - inet_ntop(AF_INET6, &p->u.prefix6, buf[0], - sizeof(buf[0])), - p->prefixlen, - inet_ntop(AF_INET6, nexthop, - buf[1], sizeof(buf[1]))); + "Zebra rmap deny: IPv6 route %pFX nexthop %s", + p, + inet_ntop(AF_INET6, nexthop, buf[1], + sizeof(buf[1]))); } } return false; -- cgit v1.2.3