From 9048bf71eef53fdec2d1fa399b19f4e9414e3a10 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Thu, 5 Dec 2019 11:47:57 +0100 Subject: wg-quick: linux: iptables-* -w is not widely supported --- src/tools/wg-quick/linux.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tools/wg-quick/linux.bash') diff --git a/src/tools/wg-quick/linux.bash b/src/tools/wg-quick/linux.bash index 4fecabb..fc90e55 100755 --- a/src/tools/wg-quick/linux.bash +++ b/src/tools/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 } -- cgit v1.2.3-59-g8ed1b