aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-03-24 12:37:47 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-24 12:45:48 -0600
commitc3a66722076127c42ac1727468dc93a82eb5d351 (patch)
tree2c131ae95e8bac71bc14e22f80b192b6de04ac13 /src
parentif_wg: simplify jail exit logic (diff)
downloadwireguard-freebsd-c3a66722076127c42ac1727468dc93a82eb5d351.tar.xz
wireguard-freebsd-c3a66722076127c42ac1727468dc93a82eb5d351.zip
if_wg: allow getting tunnelfib to race
It's word-sized, anyway, and taking the lock means crashes when moving around vnets. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src')
-rw-r--r--src/if_wg.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/if_wg.c b/src/if_wg.c
index 1434369..7786c24 100644
--- a/src/if_wg.c
+++ b/src/if_wg.c
@@ -3122,9 +3122,7 @@ wg_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCDELMULTI:
break;
case SIOCGTUNFIB:
- sx_slock(&sc->sc_lock);
ifr->ifr_fib = sc->sc_socket.so_fibnum;
- sx_sunlock(&sc->sc_lock);
break;
case SIOCSTUNFIB:
ret = priv_check(curthread, PRIV_NET_WG);