summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/netinet/ip_gre.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sys/netinet/ip_gre.c')
-rw-r--r--freebsd/sys/netinet/ip_gre.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/freebsd/sys/netinet/ip_gre.c b/freebsd/sys/netinet/ip_gre.c
index 6a88f37f..1758bfff 100644
--- a/freebsd/sys/netinet/ip_gre.c
+++ b/freebsd/sys/netinet/ip_gre.c
@@ -169,7 +169,8 @@ in_gre_srcaddr(void *arg __unused, const struct sockaddr *sa,
const struct sockaddr_in *sin;
struct gre_softc *sc;
- if (V_ipv4_srchashtbl == NULL)
+ /* Check that VNET is ready */
+ if (V_ipv4_hashtbl == NULL)
return;
MPASS(in_epoch(net_epoch_preempt));
@@ -352,6 +353,8 @@ in_gre_uninit(void)
}
if (V_ipv4_hashtbl != NULL) {
gre_hashdestroy(V_ipv4_hashtbl);
+ V_ipv4_hashtbl = NULL;
+ GRE_WAIT();
gre_hashdestroy(V_ipv4_srchashtbl);
}
}