Skip to content

Commit

Permalink
lib, pbrd: rm extra space when displaying nexthop
Browse files Browse the repository at this point in the history
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
  • Loading branch information
qlyoung committed Mar 20, 2018
1 parent 21593eb commit d53d47e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/nexthop_group.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pbrd/pbr_nht.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
7 changes: 3 additions & 4 deletions pbrd/pbr_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;
}

Expand Down

0 comments on commit d53d47e

Please sign in to comment.