summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_rmx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netinet6/in6_rmx.c')
-rw-r--r--sys/netinet6/in6_rmx.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 3cc4468..70909b1 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -289,8 +289,9 @@ static void
in6_rtqtimo(void *rock)
{
CURVNET_SET_QUIET((struct vnet *) rock);
+ INIT_VNET_NET(curvnet);
INIT_VNET_INET6(curvnet);
- struct radix_node_head *rnh = rock;
+ struct radix_node_head *rnh = V_rt_tables[0][AF_INET6];
struct rtqk_arg arg;
struct timeval atv;
static time_t last_adjusted_timeout = 0;
@@ -376,8 +377,9 @@ static void
in6_mtutimo(void *rock)
{
CURVNET_SET_QUIET((struct vnet *) rock);
+ INIT_VNET_NET(curvnet);
INIT_VNET_INET6(curvnet);
- struct radix_node_head *rnh = rock;
+ struct radix_node_head *rnh = V_rt_tables[0][AF_INET6];
struct mtuex_arg arg;
struct timeval atv;
@@ -403,7 +405,7 @@ void
in6_rtqdrain(void)
{
INIT_VNET_NET(curvnet);
- struct radix_node_head *rnh = V_rt_tables[AF_INET6];
+ struct radix_node_head *rnh = V_rt_tables[0][AF_INET6];
struct rtqk_arg arg;
arg.found = arg.killed = 0;
@@ -427,6 +429,9 @@ in6_rtqdrain(void)
int
in6_inithead(void **head, int off)
{
+#ifdef INVARIANTS
+ INIT_VNET_NET(curvnet);
+#endif
INIT_VNET_INET6(curvnet);
struct radix_node_head *rnh;
@@ -442,11 +447,12 @@ in6_inithead(void **head, int off)
V_rtq_timeout6 = RTQ_TIMEOUT;
rnh = *head;
+ KASSERT(rnh == V_rt_tables[0][AF_INET6], ("rnh?"));
rnh->rnh_addaddr = in6_addroute;
rnh->rnh_matchaddr = in6_matroute;
callout_init(&V_rtq_timer6, CALLOUT_MPSAFE);
- in6_rtqtimo(rnh); /* kick off timeout first time */
callout_init(&V_rtq_mtutimer, CALLOUT_MPSAFE);
- in6_mtutimo(rnh); /* kick off timeout first time */
+ in6_rtqtimo(curvnet); /* kick off timeout first time */
+ in6_mtutimo(curvnet); /* kick off timeout first time */
return 1;
}
OpenPOWER on IntegriCloud