From 57cdafc411806760b230499eab82df560566d893 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 e486247244..d7dbfd8a49 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 7586790c85..c8a58e46f5 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 77e4e3b6fa..0e66c39706 100644 --- a/pbrd/pbr_vty.c +++ b/pbrd/pbr_vty.c @@ -543,8 +543,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", @@ -558,11 +557,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; } -- 2.39.5