diff options
| author | Simon <965089+sarthurdev@users.noreply.github.com> | 2026-05-12 15:58:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-12 16:58:51 +0300 |
| commit | ab28ff732ca159438ef911cd91fd86ddd5000970 (patch) | |
| tree | a7e2bd032bed2302948af8f4e76b4a7ef37e1441 /src | |
| parent | 9d1657b715d8377b4b914b544ce05e375ce351d9 (diff) | |
| download | vyos-1x-ab28ff732ca159438ef911cd91fd86ddd5000970.tar.gz vyos-1x-ab28ff732ca159438ef911cd91fd86ddd5000970.zip | |
wan: T8481: scope flush-connections to WLB connection marks (#5163)
* wan: T8481: scope flush-connections to WLB connection marks
flush-connections runs conntrack --delete which destroys all conntrack
entries system-wide, including unrelated NAT translations and
established connections that have nothing to do with WLB.
WLB tags every connection it manages with a conntrack mark via the
wlb_mangle_isp_<ifname> chain (ct mark set 0xc9, 0xca, etc.). Scope
the flush to these marks so only WLB-managed connections are affected.
Signed-off-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com>
* wan: T8481: replace conntrack deletion from state changed block
---------
Signed-off-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com>
Co-authored-by: doctorpangloss <2229300+doctorpangloss@users.noreply.github.com>
Diffstat (limited to 'src')
| -rwxr-xr-x | src/helpers/vyos-load-balancer.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/helpers/vyos-load-balancer.py b/src/helpers/vyos-load-balancer.py index bd62d1479..4417c04d5 100755 --- a/src/helpers/vyos-load-balancer.py +++ b/src/helpers/vyos-load-balancer.py @@ -272,8 +272,8 @@ if __name__ == '__main__': run('ip route flush cache') if 'flush_connections' in lb: - run('conntrack --delete') - run('conntrack -F expect') + for _state in lb['health_state'].values(): + run(f'conntrack --delete --mark {_state["table_number"]}') with open(wlb_status_file, 'w') as f: f.write(json.dumps(lb['health_state'])) @@ -360,8 +360,8 @@ if __name__ == '__main__': run('ip route flush cache') if 'flush_connections' in lb: - run('conntrack --delete') - run('conntrack -F expect') + for _state in lb['health_state'].values(): + run(f'conntrack --delete --mark {_state["table_number"]}') with open(wlb_status_file, 'w') as f: f.write(json.dumps(lb['health_state'])) |
