summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_gre.c
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2014-09-21 03:56:06 +0000
committerhrs <hrs@FreeBSD.org>2014-09-21 03:56:06 +0000
commitffad09823e2578c36854d324de50f74b278d443c (patch)
tree37f42fe286c5fdf77524da667204737cea6bd792 /sys/netinet/ip_gre.c
parent05fa00b3974deb6a19f181f20751eb61db1896b5 (diff)
downloadFreeBSD-src-ffad09823e2578c36854d324de50f74b278d443c.zip
FreeBSD-src-ffad09823e2578c36854d324de50f74b278d443c.tar.gz
- Virtualize interface cloner for gre(4). This fixes a panic when destroying
a vnet jail which has a gre(4) interface. - Make net.link.gre.max_nesting vnet-local.
Diffstat (limited to 'sys/netinet/ip_gre.c')
-rw-r--r--sys/netinet/ip_gre.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c
index 53fecab..897adac 100644
--- a/sys/netinet/ip_gre.c
+++ b/sys/netinet/ip_gre.c
@@ -315,18 +315,18 @@ gre_lookup(struct mbuf *m, u_int8_t proto)
struct ip *ip = mtod(m, struct ip *);
struct gre_softc *sc;
- mtx_lock(&gre_mtx);
- for (sc = LIST_FIRST(&gre_softc_list); sc != NULL;
+ GRE_LIST_LOCK();
+ for (sc = LIST_FIRST(&V_gre_softc_list); sc != NULL;
sc = LIST_NEXT(sc, sc_list)) {
if ((sc->g_dst.s_addr == ip->ip_src.s_addr) &&
(sc->g_src.s_addr == ip->ip_dst.s_addr) &&
(sc->g_proto == proto) &&
((GRE2IFP(sc)->if_flags & IFF_UP) != 0)) {
- mtx_unlock(&gre_mtx);
+ GRE_LIST_UNLOCK();
return (sc);
}
}
- mtx_unlock(&gre_mtx);
+ GRE_LIST_UNLOCK();
return (NULL);
}
OpenPOWER on IntegriCloud