diff options
author | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2025-02-19 20:00:30 +0100 |
---|---|---|
committer | sarthurdev <965089+sarthurdev@users.noreply.github.com> | 2025-02-19 20:00:30 +0100 |
commit | 2250f15e2353d4a47fff45408f33a11f7a8db95f (patch) | |
tree | afc98a3b894a7e6b4487e2894beea11a7f6732e8 | |
parent | ab6382ede233c04ca3126f8d4089318e927c55b4 (diff) | |
download | vyos-1x-2250f15e2353d4a47fff45408f33a11f7a8db95f.tar.gz vyos-1x-2250f15e2353d4a47fff45408f33a11f7a8db95f.zip |
wlb: T4452: Use return for exclude statements
-rw-r--r-- | data/templates/load-balancing/nftables-wlb.j2 | 10 |
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) }} |