aboutsummaryrefslogtreecommitdiffstats
path: root/community/wireguard-tools/alpine-compat.patch
blob: 27d9ba5a64953148c9f9bcaff04873618b20ac69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash
--- a/src/tools/wg-quick/linux.bash
+++ b/src/tools/wg-quick/linux.bash
@@ -201,7 +201,7 @@
 	cmd ip $proto rule add table main suppress_prefixlength 0
 	while read -r key _ value; do
 		[[ $value -eq 1 ]] && sysctl -q "$key=2"
-	done < <(sysctl -a -r '^net\.ipv4.conf\.[^ .=]+\.rp_filter$')
+	done < <(sysctl -a 2>/dev/null | sed -n -r 's#^(net\.ipv4.conf\.[^ .=]+\.rp_filter)#\1#p')
 	return 0
 }