From 7b6cee897573617fb6101ad6c2cf371269fc7734 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 26 Jul 2022 16:56:18 -0400 Subject: [PATCH] bgpd: use pI4 The bgp_path_info_to_ipv6_nexthop will correctly set the nexthop value. There is no need to test this to display something that won't be used in debug Signed-off-by: Donald Sharp --- bgpd/bgp_zebra.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 2151d0a613..2f2784c3cc 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1000,19 +1000,13 @@ static bool bgp_table_map_apply(struct route_map *map, const struct prefix *p, p, &path->attr->nexthop); } if (p->family == AF_INET6) { - char buf[2][INET6_ADDRSTRLEN]; ifindex_t ifindex; struct in6_addr *nexthop; nexthop = bgp_path_info_to_ipv6_nexthop(path, &ifindex); zlog_debug( - "Zebra rmap deny: IPv6 route %pFX nexthop %s", - p, - nexthop ? inet_ntop(AF_INET6, nexthop, buf[1], - sizeof(buf[1])) - : inet_ntop(AF_INET, - &path->attr->nexthop, - buf[1], sizeof(buf[1]))); + "Zebra rmap deny: IPv6 route %pFX nexthop %pI6", + p, nexthop); } } return false; -- 2.39.5