From 13b4d20763fa609f2659ff3f57c3ed26414eb1d4 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 30 Jun 2023 12:50:43 +0200 Subject: [PATCH] Fix log error on gre tunnel fw --- openmptcprouter/files/etc/firewall.gre-tunnel | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmptcprouter/files/etc/firewall.gre-tunnel b/openmptcprouter/files/etc/firewall.gre-tunnel index 59d161781..b68ecd63a 100644 --- a/openmptcprouter/files/etc/firewall.gre-tunnel +++ b/openmptcprouter/files/etc/firewall.gre-tunnel @@ -6,7 +6,7 @@ if [ -f /usr/sbin/iptables-legacy ]; then IPTABLESRESTORE="/usr/sbin/iptables-legacy-restore" else IPTABLESSAVE="/usr/sbin/iptables-save" - IPTABLESRESTORE="/usr/sbin/iptables-restore" + IPTABLESRESTORE="/usr/sbin/iptables-restore --noflush" fi _setup_rules() { @@ -39,7 +39,7 @@ _setup_fw() { [ -n "$ifnames" ] && rule="$rule -i $(echo "${ifnames}" | sed 's/ /-i /g')" if [ -n "$rule" ] && [ -n "$lookup" ]; then $IPTABLESAVE --counters | grep -v "0x${lookup}" | $IPTABLERESTORE -w --counters - $IPTABLERESTORE --noflush <<-EOF + $IPTABLERESTORE <<-EOF *mangle -A omr-gre-tunnel ${rule} -j MARK --set-mark 0x${lookup} COMMIT @@ -48,7 +48,7 @@ _setup_fw() { } if [ -z "$($IPTABLESAVE | grep omr-gre-tunnel)" ]; then - $IPTABLERESTORE --noflush <<-EOF + $IPTABLERESTORE <<-EOF *mangle :omr-gre-tunnel - -I PREROUTING 1 -m addrtype ! --dst-type LOCAL -j omr-gre-tunnel