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
This commit is contained in:
Ruslan Ermilov 2001-06-29 08:37:12 +00:00
parent 2317b70167
commit 8f309b9151

View file

@ -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');
}