summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2001-06-29 08:37:12 +0000
committerru <ru@FreeBSD.org>2001-06-29 08:37:12 +0000
commitac2d37d7fe6973236ac61214ec1d7eaefff7a637 (patch)
tree517c008d70659a077934f3848b680bb19ea7a382 /usr.bin
parentdfbd7cf88cb7bbe3ab14b108ca452059177b2325 (diff)
downloadFreeBSD-src-ac2d37d7fe6973236ac61214ec1d7eaefff7a637.zip
FreeBSD-src-ac2d37d7fe6973236ac61214ec1d7eaefff7a637.tar.gz
Fixed bogon in revision 1.37. Don't bogusly print a radix node's
duped key marker (``=>'') for routes with non-positive rmx_expire metric, such as ethernet interface routes. MFC after: 1 week
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/netstat/route.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c
index c5956d8..2831539 100644
--- a/usr.bin/netstat/route.c
+++ b/usr.bin/netstat/route.c
@@ -626,15 +626,10 @@ p_rtentry(struct rtentry *rt)
if ((expire_time =
rt->rt_rmx.rmx_expire - time((time_t *)0)) > 0)
- printf(" %6d%s", (int)expire_time,
- rt->rt_nodes[0].rn_dupedkey ? " =>" : "");
- else
- goto ifandkey;
- } else if (rt->rt_nodes[0].rn_dupedkey) {
-ifandkey:;
- printf(" =>");
+ printf(" %6d", (int)expire_time);
}
-
+ if (rt->rt_nodes[0].rn_dupedkey)
+ printf(" =>");
}
putchar('\n');
}
OpenPOWER on IntegriCloud