diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:47:57 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2019-12-05 11:48:25 +0100 |
commit | 9eab3487cdd78b11306e9f80e041d6da80060ef2 (patch) | |
tree | 276368528d9aaa553e20c825de796576e7e084af | |
parent | ipc: make sure userspace communication frees wgdevice (diff) | |
download | wireguard-tools-9eab3487cdd78b11306e9f80e041d6da80060ef2.tar.xz wireguard-tools-9eab3487cdd78b11306e9f80e041d6da80060ef2.zip |
wg-quick: linux: iptables-* -w is not widely supported
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rwxr-xr-x | src/wg-quick/linux.bash | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wg-quick/linux.bash b/src/wg-quick/linux.bash index 4fecabb..fc90e55 100755 --- a/src/wg-quick/linux.bash +++ b/src/wg-quick/linux.bash @@ -190,7 +190,7 @@ remove_iptables() { [[ $line == "-A"* ]] && found=1 printf -v restore '%s\n%s' "$restore" "${line/#-A/-D}" done < <($iptables-save) - [[ $found -ne 1 ]] || echo "$restore" | cmd $iptables-restore -nw + [[ $found -ne 1 ]] || echo "$restore" | cmd $iptables-restore -n done } @@ -217,7 +217,7 @@ add_default() { done printf -v restore '%s\nCOMMIT\n*mangle\n-I POSTROUTING -m mark --mark %d -p udp -j CONNMARK --save-mark %s\n-I PREROUTING -p udp -j CONNMARK --restore-mark %s\nCOMMIT\n' "$restore" $table "$marker" "$marker" [[ $proto == -4 ]] && cmd sysctl -q net.ipv4.conf.all.src_valid_mark=1 - echo "$restore" | cmd $iptables-restore -nw + echo "$restore" | cmd $iptables-restore -n HAVE_SET_IPTABLES=1 return 0 } |