From a566bde12636b6b995b800421fd8061e28554b73 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 1 Oct 2017 21:37:53 +0200 Subject: [PATCH] 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 --- src/wg-quick.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }