summaryrefslogtreecommitdiff
path: root/bgpd/rfapi/rfapi_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/rfapi/rfapi_vty.c')
-rw-r--r--bgpd/rfapi/rfapi_vty.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/bgpd/rfapi/rfapi_vty.c b/bgpd/rfapi/rfapi_vty.c
index 850e8325c9..b9a6c4ddc4 100644
--- a/bgpd/rfapi/rfapi_vty.c
+++ b/bgpd/rfapi/rfapi_vty.c
@@ -1596,7 +1596,6 @@ void rfapiPrintDescriptor(struct vty *vty, struct rfapi_descriptor *rfd)
int rc;
afi_t afi;
struct rfapi_adb *adb;
- char buf[PREFIX_STRLEN];
vty_out(vty, "%-10p ", rfd);
rfapiPrintRfapiIpAddr(vty, &rfd->un_addr);
@@ -1648,9 +1647,8 @@ void rfapiPrintDescriptor(struct vty *vty, struct rfapi_descriptor *rfd)
if (family != adb->u.s.prefix_ip.family)
continue;
- prefix2str(&adb->u.s.prefix_ip, buf, sizeof(buf));
-
- vty_out(vty, " Adv Pfx: %s%s", buf, HVTYNL);
+ vty_out(vty, " Adv Pfx: %pFX%s", &adb->u.s.prefix_ip,
+ HVTYNL);
rfapiPrintAdvertisedInfo(vty, rfd, SAFI_MPLS_VPN,
&adb->u.s.prefix_ip);
}
@@ -1659,10 +1657,7 @@ void rfapiPrintDescriptor(struct vty *vty, struct rfapi_descriptor *rfd)
(void **)&adb, &cursor);
rc == 0; rc = skiplist_next(rfd->advertised.ip0_by_ether, NULL,
(void **)&adb, &cursor)) {
-
- prefix2str(&adb->u.s.prefix_eth, buf, sizeof(buf));
-
- vty_out(vty, " Adv Pfx: %s%s", buf, HVTYNL);
+ vty_out(vty, " Adv Pfx: %pFX%s", &adb->u.s.prefix_eth, HVTYNL);
/* TBD update the following function to print ethernet info */
/* Also need to pass/use rd */
@@ -1863,11 +1858,9 @@ void rfapiPrintNhl(void *stream, struct rfapi_next_hop_entry *next_hops)
break;
case RFAPI_VN_OPTION_TYPE_LOCAL_NEXTHOP:
- prefix2str(&vo->v.local_nexthop.addr,
- pbuf, sizeof(pbuf));
- fp(out, "%sLNH %s cost=%d%s", offset,
- pbuf, vo->v.local_nexthop.cost,
- HVTYNL);
+ fp(out, "%sLNH %pFX cost=%d%s", offset,
+ &vo->v.local_nexthop.addr,
+ vo->v.local_nexthop.cost, HVTYNL);
break;
default: