From: Jason A. Donenfeld Date: Sun, 1 Oct 2017 19:37:53 +0000 (+0200) Subject: wg-quick: anchor sysctl regex to start and end X-Git-Tag: v1.0.20191226~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a566bde12636b6b995b800421fd8061e28554b73;p=thirdparty%2Fwireguard-tools.git wg-quick: anchor sysctl regex to start and end This doesn't actually fix a real problem, but it is more correct than not having it. Suggested-by: Aaron Sigel Signed-off-by: Jason A. Donenfeld --- diff --git a/src/wg-quick.bash b/src/wg-quick.bash index e5ae48f..c70c078 100755 --- a/src/wg-quick.bash +++ b/src/wg-quick.bash @@ -163,7 +163,7 @@ add_default() { local key value 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 -r '^net\.ipv4.conf\.[^ .=]+\.rp_filter$') return 0 }