X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=bgpd%2Fbgp_debug.c;h=bfde1c127e1ec09aae6d34f74284c20f329b62f1;hb=ac2f64d3ec2fe63d3d1ba13f5c297cd70aed4364;hp=a629695a3b7c0bf0ef02118aacdc2d7d346539b0;hpb=8d133f9460ab86e7aaa1658bd3df5d9cfbf1a6ad;p=mirror_frr.git diff --git a/bgpd/bgp_debug.c b/bgpd/bgp_debug.c index a629695a3..bfde1c127 100644 --- a/bgpd/bgp_debug.c +++ b/bgpd/bgp_debug.c @@ -378,8 +378,6 @@ bool bgp_debug_peer_updout_enabled(char *host) /* Dump attribute. */ bool bgp_dump_attr(struct attr *attr, char *buf, size_t size) { - char addrbuf[BUFSIZ]; - if (!attr) return false; @@ -395,15 +393,12 @@ bool bgp_dump_attr(struct attr *attr, char *buf, size_t size) /* Add MP case. */ if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL || attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) - snprintf(buf + strlen(buf), size - strlen(buf), - ", mp_nexthop %s", - inet_ntop(AF_INET6, &attr->mp_nexthop_global, addrbuf, - BUFSIZ)); + snprintfrr(buf + strlen(buf), size - strlen(buf), + ", mp_nexthop %pI6", &attr->mp_nexthop_global); if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV6_GLOBAL_AND_LL) - snprintf(buf + strlen(buf), size - strlen(buf), "(%s)", - inet_ntop(AF_INET6, &attr->mp_nexthop_local, addrbuf, - BUFSIZ)); + snprintfrr(buf + strlen(buf), size - strlen(buf), "(%pI6)", + &attr->mp_nexthop_local); if (attr->mp_nexthop_len == BGP_ATTR_NHLEN_IPV4) snprintfrr(buf, size, "nexthop %pI4", &attr->nexthop); @@ -1415,9 +1410,7 @@ DEFUN (no_debug_bgp_update_direct_peer, return CMD_SUCCESS; } -#ifndef VTYSH_EXTRACT_PL #include "bgpd/bgp_debug_clippy.c" -#endif DEFPY (debug_bgp_update_prefix_afi_safi, debug_bgp_update_prefix_afi_safi_cmd,