]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg-quick: anchor sysctl regex to start and end
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 1 Oct 2017 19:37:53 +0000 (21:37 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 2 Oct 2017 00:45:53 +0000 (02:45 +0200)
This doesn't actually fix a real problem, but it is more correct than
not having it.

Suggested-by: Aaron Sigel <aaron@vtty.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick.bash

index e5ae48f27edc874a9164e0540649784db2ca33c5..c70c0789ff47bc9967b6fc6406d6540c39ac25de 100755 (executable)
@@ -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
 }