From 2f5eb3efc34da815f71ff0d430058dda2aa85b7c Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Tue, 20 Mar 2018 16:43:54 -0400 Subject: [PATCH] lib, pbrd: rm extra space when displaying nexthop Signed-off-by: Quentin Young --- lib/nexthop_group.c | 2 +- pbrd/pbr_nht.c | 2 +- pbrd/pbr_vty.c | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/nexthop_group.c b/lib/nexthop_group.c index e486247244c3..d7dbfd8a495a 100644 --- a/lib/nexthop_group.c +++ b/lib/nexthop_group.c @@ -320,7 +320,7 @@ void nexthop_group_write_nexthop(struct vty *vty, struct nexthop *nh) char buf[100]; struct vrf *vrf; - vty_out(vty, " nexthop "); + vty_out(vty, "nexthop "); switch (nh->type) { case NEXTHOP_TYPE_IFINDEX: diff --git a/pbrd/pbr_nht.c b/pbrd/pbr_nht.c index fb79e94b29c4..e930a6fd089b 100644 --- a/pbrd/pbr_nht.c +++ b/pbrd/pbr_nht.c @@ -771,7 +771,7 @@ static void pbr_nht_show_nhg_nexthops(struct hash_backet *b, void *data) struct pbr_nexthop_cache *pnhc = b->data; struct vty *vty = data; - vty_out(vty, "\tValid: %d", pnhc->valid); + vty_out(vty, "\tValid: %d ", pnhc->valid); nexthop_group_write_nexthop(vty, pnhc->nexthop); } diff --git a/pbrd/pbr_vty.c b/pbrd/pbr_vty.c index b2381bb9c7b1..69ab1ab0b9be 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -544,8 +544,7 @@ static int pbr_vty_map_config_write_sequence(struct vty *vty, { char buff[PREFIX_STRLEN]; - vty_out(vty, "pbr-map %s seq %u\n", - pbrm->name, pbrms->seqno); + vty_frame(vty, "pbr-map %s seq %u\n", pbrm->name, pbrms->seqno); if (pbrms->src) vty_out(vty, " match src-ip %s\n", @@ -559,11 +558,11 @@ static int pbr_vty_map_config_write_sequence(struct vty *vty, vty_out(vty, " set nexthop-group %s\n", pbrms->nhgrp_name); if (pbrms->nhg) { - vty_out(vty, " set"); + vty_out(vty, " set "); nexthop_group_write_nexthop(vty, pbrms->nhg->nexthop); } - vty_out(vty, "!\n"); + vty_endframe(vty, "!\n"); return 1; }