diff options
author | ae <ae@FreeBSD.org> | 2015-06-05 08:10:08 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-06-05 08:10:08 +0000 |
commit | c84e575eec81d97264ecd157eaff36672a5b66d3 (patch) | |
tree | 32d6f733cfa6371b0be3f440d55620f2b879c32c /sys/netinet | |
parent | 200ce7d83609576bee49855a6c2967c380f9052b (diff) | |
download | FreeBSD-src-c84e575eec81d97264ecd157eaff36672a5b66d3.zip FreeBSD-src-c84e575eec81d97264ecd157eaff36672a5b66d3.tar.gz |
MFC r271918 (by hrs):
- 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')
-rw-r--r-- | sys/netinet/ip_gre.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index a36a486..33eb38c 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -318,18 +318,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); } |