summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2010-07-08 09:42:32 +0000
committerclaudio <claudio@openbsd.org>2010-07-08 09:42:32 +0000
commit86bd313ba7d7c68df16006ace156f903ca4fd883 (patch)
tree7a9efd89af32d101aa2eb72fedf165bda262fc3d
parentKill more code in kroute.c that is unneeded in ldpd. ldpd is a bit strange (diff)
downloadwireguard-openbsd-86bd313ba7d7c68df16006ace156f903ca4fd883.tar.xz
wireguard-openbsd-86bd313ba7d7c68df16006ace156f903ca4fd883.zip
Update after kroute.c change. As a goody print the route priority.
OK michele@
-rw-r--r--usr.sbin/ldpctl/ldpctl.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/usr.sbin/ldpctl/ldpctl.c b/usr.sbin/ldpctl/ldpctl.c
index 3316763ba2a..a2fde8099d8 100644
--- a/usr.sbin/ldpctl/ldpctl.c
+++ b/usr.sbin/ldpctl/ldpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpctl.c,v 1.10 2010/06/07 13:24:23 claudio Exp $
+/* $OpenBSD: ldpctl.c,v 1.11 2010/07/08 09:42:32 claudio Exp $
*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -390,9 +390,9 @@ show_nbr_msg(struct imsg *imsg)
void
show_lfib_head(void)
{
- printf("flags: * = valid, C = Connected, S = Static\n");
- printf("%-6s %-20s %-17s %-17s %s\n", "Flags", "Destination", "Nexthop",
- "Local Label", "Remote Label");
+ printf("Flags: C = Connected, S = Static\n");
+ printf(" %-4s %-20s %-17s %-17s %s\n", "Prio", "Destination",
+ "Nexthop", "Local Label", "Remote Label");
}
int
@@ -407,21 +407,14 @@ show_lfib_msg(struct imsg *imsg)
errx(1, "wrong imsg len");
k = imsg->data;
- if (k->flags & F_DOWN)
- printf(" ");
- else
- printf("*");
-
- if (!(k->flags & F_KERNEL))
- printf("R");
- else if (k->flags & F_CONNECTED)
+ if (k->flags & F_CONNECTED)
printf("C");
else if (k->flags & F_STATIC)
printf("S");
else
printf(" ");
- printf(" ");
+ printf(" %3d ", k->priority);
if (asprintf(&p, "%s/%u", inet_ntoa(k->prefix),
k->prefixlen) == -1)
err(1, NULL);