summaryrefslogtreecommitdiff
path: root/ldpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-30 06:23:59 -0500
committerGitHub <noreply@github.com>2017-03-30 06:23:59 -0500
commit821260f642ccf77e87d1b2f26d6c6a9ab9a6b4cd (patch)
tree2e3ff29d63a00f617da84799533d0b1ef5782a7b /ldpd
parent7c7148e6c328f41b896f95368dea4bc6b678cf16 (diff)
parent3048625a8cf1a285e41cf25709a18cb9b6194061 (diff)
Merge pull request #297 from opensourcerouting/ldpd-openbsd
Add support for MPLSv6 in OpenBSD + minor fixes
Diffstat (limited to 'ldpd')
-rw-r--r--ldpd/lde.c2
-rw-r--r--ldpd/ldp_vty_exec.c29
2 files changed, 16 insertions, 15 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index e927e45367..53fde32fd9 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -170,7 +170,7 @@ lde(const char *user, const char *group, u_short instance)
zprivs_init(&lde_privs);
#ifdef HAVE_PLEDGE
- if (pledge("stdio recvfd", NULL) == -1)
+ if (pledge("stdio recvfd unix", NULL) == -1)
fatal("pledge");
#endif
diff --git a/ldpd/ldp_vty_exec.c b/ldpd/ldp_vty_exec.c
index 616847b363..dfd5af9748 100644
--- a/ldpd/ldp_vty_exec.c
+++ b/ldpd/ldp_vty_exec.c
@@ -213,10 +213,10 @@ show_discovery_msg(struct vty *vty, struct imsg *imsg,
vty_out(vty, "%-8s %-15s ", "Targeted", addr);
if (strlen(addr) > 15)
- vty_out(vty, "\n%46s", " ");
+ vty_out(vty, "%s%46s", VTY_NEWLINE, " ");
break;
}
- vty_out(vty, "%9u\n", adj->holdtime);
+ vty_out(vty, "%9u%s", adj->holdtime, VTY_NEWLINE);
break;
case IMSG_CTL_END:
vty_out(vty, "%s", VTY_NEWLINE);
@@ -516,9 +516,9 @@ show_nbr_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
af_name(nbr->af), inet_ntoa(nbr->id),
nbr_state_name(nbr->nbr_state), addr);
if (strlen(addr) > 15)
- vty_out(vty, "\n%48s", " ");
- vty_out(vty, " %8s\n", nbr->uptime == 0 ? "-" :
- log_time(nbr->uptime));
+ vty_out(vty, "%s%48s", VTY_NEWLINE, " ");
+ vty_out(vty, " %8s%s", nbr->uptime == 0 ? "-" :
+ log_time(nbr->uptime), VTY_NEWLINE);
break;
case IMSG_CTL_END:
return (1);
@@ -1031,10 +1031,10 @@ show_lib_msg(struct vty *vty, struct imsg *imsg, struct show_params *params)
vty_out(vty, "%-4s %-20s", af_name(rt->af), dstnet);
if (strlen(dstnet) > 20)
- vty_out(vty, "\n%25s", " ");
- vty_out(vty, " %-15s %-11s %-13s %6s\n", inet_ntoa(rt->nexthop),
+ vty_out(vty, "%s%25s", VTY_NEWLINE, " ");
+ vty_out(vty, " %-15s %-11s %-13s %6s%s", inet_ntoa(rt->nexthop),
log_label(rt->local_label), log_label(rt->remote_label),
- rt->in_use ? "yes" : "no");
+ rt->in_use ? "yes" : "no", VTY_NEWLINE);
break;
case IMSG_CTL_END:
vty_out(vty, "%s", VTY_NEWLINE);
@@ -1603,9 +1603,9 @@ ldp_vty_show_binding(struct vty *vty, struct vty_arg *args[])
params.json = vty_get_arg_value(args, "json") ? 1 : 0;
if (!params.detail && !params.json)
- vty_out(vty, "%-4s %-20s %-15s %-11s %-13s %6s\n", "AF",
+ vty_out(vty, "%-4s %-20s %-15s %-11s %-13s %6s%s", "AF",
"Destination", "Nexthop", "Local Label", "Remote Label",
- "In Use");
+ "In Use", VTY_NEWLINE);
imsg_compose(&ibuf, IMSG_CTL_SHOW_LIB, 0, 0, -1, NULL, 0);
return (ldp_vty_dispatch(vty, &ibuf, SHOW_LIB, &params));
@@ -1632,8 +1632,8 @@ ldp_vty_show_discovery(struct vty *vty, struct vty_arg *args[])
params.json = vty_get_arg_value(args, "json") ? 1 : 0;
if (!params.detail && !params.json)
- vty_out(vty, "%-4s %-15s %-8s %-15s %9s\n",
- "AF", "ID", "Type", "Source", "Holdtime");
+ vty_out(vty, "%-4s %-15s %-8s %-15s %9s%s",
+ "AF", "ID", "Type", "Source", "Holdtime", VTY_NEWLINE);
if (params.detail)
imsg_compose(&ibuf, IMSG_CTL_SHOW_DISCOVERY_DTL, 0, 0, -1,
@@ -1745,8 +1745,9 @@ ldp_vty_show_neighbor(struct vty *vty, struct vty_arg *args[])
params.detail = 1;
if (!params.detail && !params.json)
- vty_out(vty, "%-4s %-15s %-11s %-15s %8s\n",
- "AF", "ID", "State", "Remote Address", "Uptime");
+ vty_out(vty, "%-4s %-15s %-11s %-15s %8s%s",
+ "AF", "ID", "State", "Remote Address", "Uptime",
+ VTY_NEWLINE);
imsg_compose(&ibuf, IMSG_CTL_SHOW_NBR, 0, 0, -1, NULL, 0);
return (ldp_vty_dispatch(vty, &ibuf, SHOW_NBR, &params));