]> git.ipfire.org Git - thirdparty/wireguard-tools.git/commitdiff
wg-quick: linux: iptables-* -w is not widely supported
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 5 Dec 2019 10:47:57 +0000 (11:47 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 5 Dec 2019 10:48:25 +0000 (11:48 +0100)
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/wg-quick/linux.bash

index 4fecabb34058fa22bd47b1e9e77f9ba021207f15..fc90e55b123d85641fad222b432fc61247f0f684 100755 (executable)
@@ -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
 }