summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2015-11-22 13:11:27 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2015-11-22 13:11:27 +0000
commitf06a2f825b72cc678ad244ed598777a44190f891 (patch)
treeeb534b63e26d0f1acfa839f79237f11780e062d8
parent133a1308b1d2e18611a184d0b42336639cadb06d (diff)
There is still a bit of an issue with connected routes in the RIB. Print
what ospfd thinks is connected by adding a 'C' to the nexthop output.
-rw-r--r--usr.sbin/ospfctl/ospfctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/ospfctl/ospfctl.c b/usr.sbin/ospfctl/ospfctl.c
index 375615f14c9..d25a6c66426 100644
--- a/usr.sbin/ospfctl/ospfctl.c
+++ b/usr.sbin/ospfctl/ospfctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfctl.c,v 1.61 2015/10/09 23:33:54 deraadt Exp $ */
+/* $OpenBSD: ospfctl.c,v 1.62 2015/11/22 13:11:26 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -1053,8 +1053,9 @@ show_rib_msg(struct imsg *imsg)
errx(1, "Invalid route type");
}
- printf("%-20s %-17s %-12s %-9s %-7d %s\n", dstnet,
- inet_ntoa(rt->nexthop), path_type_name(rt->p_type),
+ printf("%-20s %-16s%s %-12s %-9s %-7d %s\n", dstnet,
+ inet_ntoa(rt->nexthop), rt->connected ? "C" : " ",
+ path_type_name(rt->p_type),
dst_type_name(rt->d_type), rt->cost,
rt->uptime == 0 ? "-" : fmt_timeframe_core(rt->uptime));
free(dstnet);