summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2025-02-19 20:00:30 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2025-02-19 20:00:30 +0100
commit2250f15e2353d4a47fff45408f33a11f7a8db95f (patch)
treeafc98a3b894a7e6b4487e2894beea11a7f6732e8
parentab6382ede233c04ca3126f8d4089318e927c55b4 (diff)
downloadvyos-1x-2250f15e2353d4a47fff45408f33a11f7a8db95f.tar.gz
vyos-1x-2250f15e2353d4a47fff45408f33a11f7a8db95f.zip
wlb: T4452: Use return for exclude statements
-rw-r--r--data/templates/load-balancing/nftables-wlb.j210
1 files changed, 5 insertions, 5 deletions
diff --git a/data/templates/load-balancing/nftables-wlb.j2 b/data/templates/load-balancing/nftables-wlb.j2
index 75604aca1..b3d7c3376 100644
--- a/data/templates/load-balancing/nftables-wlb.j2
+++ b/data/templates/load-balancing/nftables-wlb.j2
@@ -25,7 +25,7 @@ table ip vyos_wanloadbalance {
{% if rule is vyos_defined %}
{% for rule_id, rule_conf in rule.items() %}
{% if rule_conf.exclude is vyos_defined %}
- {{ rule_conf | wlb_nft_rule(rule_id, exclude=True, action='accept') }}
+ {{ rule_conf | wlb_nft_rule(rule_id, exclude=True, action='return') }}
{% else %}
{% set limit = rule_conf.limit is vyos_defined %}
{{ rule_conf | wlb_nft_rule(rule_id, limit=limit, weight=True, health_state=health_state) }}
@@ -38,13 +38,13 @@ table ip vyos_wanloadbalance {
chain wlb_mangle_output {
type filter hook output priority -150; policy accept;
{% if enable_local_traffic is vyos_defined %}
- meta mark != 0x0 counter accept
- meta l4proto icmp counter accept
- ip saddr 127.0.0.0/8 ip daddr 127.0.0.0/8 counter accept
+ meta mark != 0x0 counter return
+ meta l4proto icmp counter return
+ ip saddr 127.0.0.0/8 ip daddr 127.0.0.0/8 counter return
{% if rule is vyos_defined %}
{% for rule_id, rule_conf in rule.items() %}
{% if rule_conf.exclude is vyos_defined %}
- {{ rule_conf | wlb_nft_rule(rule_id, local=True, exclude=True, action='accept') }}
+ {{ rule_conf | wlb_nft_rule(rule_id, local=True, exclude=True, action='return') }}
{% else %}
{% set limit = rule_conf.limit is vyos_defined %}
{{ rule_conf | wlb_nft_rule(rule_id, local=True, limit=limit, weight=True, health_state=health_state) }}