summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-02-20 07:32:41 +0100
committerGitHub <noreply@github.com>2025-02-20 07:32:41 +0100
commit624039b27efc7228d815471e1f917bbd237b1db3 (patch)
tree8e9d7c28692c371345b43d58d0b7723955b34efc /data
parentd3398e300e1d5e1861ebac560c105e558a3e10d3 (diff)
parent2250f15e2353d4a47fff45408f33a11f7a8db95f (diff)
downloadvyos-1x-624039b27efc7228d815471e1f917bbd237b1db3.tar.gz
vyos-1x-624039b27efc7228d815471e1f917bbd237b1db3.zip
Merge pull request #4356 from sarthurdev/wlb_python
wlb: T4452: Use return for exclude statements
Diffstat (limited to 'data')
-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) }}