summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2023-09-19 12:24:35 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2023-09-19 13:19:53 +0200
commit0984a36f6d6427bb6cb665002be3e67c4a72ff9d (patch)
tree1ba3123b08fdb08dfc45295091a461cc39046dc0
parentbbe32749e66c208312dffadbbd076fdc34ceeb5b (diff)
downloadvyos-1x-0984a36f6d6427bb6cb665002be3e67c4a72ff9d.tar.gz
vyos-1x-0984a36f6d6427bb6cb665002be3e67c4a72ff9d.zip
bridge: T4072: Prevent error when removing firewall bridge config
A commit that removes `firewall bridge` will delete the table and not re-create it. Therefore any further firewall commit will fail trying to delete the non-existent bridge table. This commit ensures the table is always present (even if empty) to ensure successful commit.
-rw-r--r--data/templates/firewall/nftables.j22
1 files changed, 0 insertions, 2 deletions
diff --git a/data/templates/firewall/nftables.j2 b/data/templates/firewall/nftables.j2
index b74522109..75800ee3d 100644
--- a/data/templates/firewall/nftables.j2
+++ b/data/templates/firewall/nftables.j2
@@ -267,9 +267,7 @@ table ip6 vyos_filter {
{% if first_install is not vyos_defined %}
delete table bridge vyos_filter
{% endif %}
-{% if bridge is vyos_defined %}
table bridge vyos_filter {
{{ bridge_tmpl.bridge(bridge) }}
{{ group_tmpl.groups(group, False, False) }}
}
-{% endif %}