Skip to content
This repository has been archived by the owner on Dec 27, 2019. It is now read-only.

Commit

Permalink
wg-quick: linux: iptables-* -w is not widely supported
Browse files Browse the repository at this point in the history
  • Loading branch information
zx2c4 committed Dec 5, 2019
1 parent eed7ef0 commit 9048bf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tools/wg-quick/linux.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}
Expand Down

0 comments on commit 9048bf7

Please sign in to comment.