]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet6/ip6_forward.c
xnu-792.21.3.tar.gz
[apple/xnu.git] / bsd / netinet6 / ip6_forward.c
index d857cc307e568cf43e3181c28c35158d3645b9bb..4cb3871ad9f7fb7e5c558dff2b6e822a44237f15 100644 (file)
@@ -273,7 +273,14 @@ ip6_forward(m, srcrt, locked)
        state.ro = NULL;        /* update at ipsec6_output_tunnel() */
        state.dst = NULL;       /* update at ipsec6_output_tunnel() */
 
+       if (locked)
+                       lck_mtx_unlock(ip6_mutex);
        error = ipsec6_output_tunnel(&state, sp, 0);
+       if (locked) {
+                       lck_mtx_unlock(sadb_mutex);
+                       lck_mtx_lock(ip6_mutex);
+                       lck_mtx_lock(sadb_mutex);
+       }
 
        m = state.m;
        key_freesp(sp);