diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-03-30 09:53:44 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2006-03-30 09:53:44 +0000 |
commit | fc577400dc1feaf4fc94d4ec5afd76e2dfa4ab4f (patch) | |
tree | 3420f257d7f57094724ccaeae3e7b37549db3563 /sys/net/rtsock.c | |
parent | e29cd64d5436256eac9c832805ce70df11b59a9f (diff) |
In sysctl_dumpentry() pass the rt_refcnt by overloading rmx_rttvar.
This new rmx_refcnt can be used by route(8) to produce the same output
as netstat(1). OK henning@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 05c25ef73cb..56c7a20579f 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.55 2006/03/30 08:28:16 claudio Exp $ */ +/* $OpenBSD: rtsock.c,v 1.56 2006/03/30 09:53:43 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -811,6 +811,7 @@ sysctl_dumpentry(struct radix_node *rn, void *v) rtm->rtm_flags = rt->rt_flags; rtm->rtm_use = 0; rt_getmetrics(&rt->rt_rmx, &rtm->rtm_rmx); + rtm->rtm_rmx.rmx_refcnt = (u_long)rt->rt_refcnt; rtm->rtm_index = rt->rt_ifp->if_index; rtm->rtm_errno = rtm->rtm_pid = rtm->rtm_seq = 0; rtm->rtm_addrs = info.rti_addrs; |