Restore printing of routes cloned from a RTF_CLONING parent

(e.g., ARP table entries) with the default routing display.

PR:		bin/26970
Reviewed by:	wollman
MFC after:	3 days
This commit is contained in:
ru 2001-05-07 12:29:36 +00:00
parent b4e77391c3
commit 0a9fa3241f
2 changed files with 10 additions and 9 deletions

View File

@ -101,13 +101,10 @@ show the state of all sockets; normally sockets used by
server processes are not shown.
With the routing table display (option
.Fl r ,
as described below), show cloned routes (routes
as described below), show protocol-cloned routes (routes
generated by a
parent route with either
.Dv RTF_CLONING
or
.Dv RTF_PRCLONING
flag set); normally these routes are
parent route); normally these routes are
not shown.
.It Fl b
With the interface display (option
@ -247,7 +244,7 @@ If this option is repeated, counters with a value of zero are suppressed.
Show the routing tables.
Use with
.Fl a
to show cloned routes.
to show protocol-cloned routes.
When
.Fl s
is also present, show routing statistics instead.

View File

@ -582,16 +582,20 @@ p_rtentry(rt)
register struct rtentry *rt;
{
static struct ifnet ifnet, *lastif;
struct rtentry parent;
static char name[16];
static char prettyname[9];
struct sockaddr *sa;
sa_u addr, mask;
/*
* Don't print cloned routes unless -a.
* Don't print protocol-cloned routes unless -a.
*/
if (rt->rt_flags & RTF_WASCLONED && !aflag)
return;
if (rt->rt_flags & RTF_WASCLONED && !aflag) {
kget(rt->rt_parent, parent);
if (parent.rt_flags & RTF_PRCLONING)
return;
}
bzero(&addr, sizeof(addr));
if ((sa = kgetsa(rt_key(rt))))