diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-06-29 08:37:12 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-06-29 08:37:12 +0000 |
commit | 8f309b9151d7c2f652da4e3124e3d3c0dca04d54 (patch) | |
tree | 517c008d70659a077934f3848b680bb19ea7a382 /usr.bin/netstat/route.c | |
parent | 2317b701676c344a0392feb31a8e5c5521e4c91a (diff) | |
download | src-8f309b9151d7c2f652da4e3124e3d3c0dca04d54.tar.gz src-8f309b9151d7c2f652da4e3124e3d3c0dca04d54.zip |
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
Notes
Notes:
svn path=/head/; revision=78957
Diffstat (limited to 'usr.bin/netstat/route.c')
-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 c5956d8778e5..28315390c8bc 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'); } |