summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_hostcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet/tcp_hostcache.c')
-rw-r--r--sys/netinet/tcp_hostcache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 71f4626..84586db 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -227,7 +227,7 @@ tcp_hc_init(void)
*/
callout_init(&V_tcp_hc_callout, CALLOUT_MPSAFE);
callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
- tcp_hc_purge, 0);
+ tcp_hc_purge, curvnet);
}
/*
@@ -634,9 +634,10 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS)
static void
tcp_hc_purge(void *arg)
{
+ CURVNET_SET((struct vnet *) arg);
INIT_VNET_INET(curvnet);
struct hc_metrics *hc_entry, *hc_next;
- int all = (intptr_t)arg;
+ int all = 0; /* XXX was: (intptr_t)arg - makes no sense? */
int i;
if (V_tcp_hostcache.purgeall) {
@@ -662,4 +663,5 @@ tcp_hc_purge(void *arg)
callout_reset(&V_tcp_hc_callout, V_tcp_hostcache.prune * hz,
tcp_hc_purge, arg);
+ CURVNET_RESTORE();
}
OpenPOWER on IntegriCloud