diff options
author | ru <ru@FreeBSD.org> | 2001-06-29 08:37:12 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-06-29 08:37:12 +0000 |
commit | ac2d37d7fe6973236ac61214ec1d7eaefff7a637 (patch) | |
tree | 517c008d70659a077934f3848b680bb19ea7a382 /usr.bin/netstat | |
parent | dfbd7cf88cb7bbe3ab14b108ca452059177b2325 (diff) | |
download | FreeBSD-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/netstat')
-rw-r--r-- | usr.bin/netstat/route.c | 11 |
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'); } |