From 9eab3487cdd78b11306e9f80e041d6da80060ef2 Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Thu, 5 Dec 2019 11:47:57 +0100
Subject: [PATCH] wg-quick: linux: iptables-* -w is not widely supported

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
 src/wg-quick/linux.bash | 4 ++--
 1 file 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
 }