Browse Source

net/wireguard: wg-quick: freebsd: workaround SIOCGIFSTATUS race in FreeBSD kernel

master
Bernhard Fröhlich 2 months ago
parent
commit
92d48bb5e8
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333

net/wireguard/files/patch-69ffe5b7f58ce6f55dda2b9e13ff364a0d9b3dcd → net/wireguard/files/patch-90c546598c0a9d9da82c138c6c9c1396c453368e View File

@@ -1,21 +1,22 @@
1
-From 69ffe5b7f58ce6f55dda2b9e13ff364a0d9b3dcd Mon Sep 17 00:00:00 2001
1
+From 90c546598c0a9d9da82c138c6c9c1396c453368e Mon Sep 17 00:00:00 2001
2 2
 From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3 3
 Date: Sun, 21 Apr 2019 10:11:36 +0900
4 4
 Subject: wg-quick: freebsd: workaround SIOCGIFSTATUS race in FreeBSD kernel
5 5
 
6 6
 ---
7
- src/tools/wg-quick/freebsd.bash | 8 +++++++-
8
- 1 file changed, 7 insertions(+), 1 deletion(-)
7
+ src/tools/wg-quick/freebsd.bash | 9 ++++++++-
8
+ 1 file changed, 8 insertions(+), 1 deletion(-)
9 9
 
10 10
 diff --git a/src/tools/wg-quick/freebsd.bash b/src/tools/wg-quick/freebsd.bash
11
-index 9d3a4026..a1a80d36 100755
11
+index 9d3a4026..54a08f7b 100755
12 12
 --- wg-quick/freebsd.bash
13 13
 +++ wg-quick/freebsd.bash
14
-@@ -274,7 +274,13 @@ monitor_daemon() {
14
+@@ -274,7 +274,14 @@ monitor_daemon() {
15 15
  	# endpoints change.
16 16
  	while read -r event; do
17 17
  		[[ $event == RTM_* ]] || continue
18 18
 -		ifconfig "$INTERFACE" >/dev/null 2>&1 || break
19
++		[[ -e /var/run/wireguard/$INTERFACE.sock ]] || break
19 20
 +		# The goal is simply to determine whether or not the interface exists. The
20 21
 +		# straight-forward way of doing this would be `ifconfig $INTERFACE`, but this
21 22
 +		# invokes the SIOCGIFSTATUS ioctl, which races with interface shutdown inside

Loading…
Cancel
Save