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 <aaron@vtty.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
5b65f87e9f
commit
a566bde126
|
@ -163,7 +163,7 @@ add_default() {
|
||||||
local key value
|
local key value
|
||||||
while read -r key _ value; do
|
while read -r key _ value; do
|
||||||
[[ $value -eq 1 ]] && sysctl -q "$key=2"
|
[[ $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
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue