diff options
| author | Julian Anastasov <ja@ssi.bg> | 2026-07-31 22:27:42 +0800 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2026-08-10 20:14:54 +0200 |
| commit | 8f843441c4e7eae8ea83491e8c203c2b192edcf5 (patch) | |
| tree | acd6773a14116540b449f6ecc0c8fac6aae66589 /include/memory | |
| parent | 04d2feaed8d0103c498727191ba04001d5100e67 (diff) | |
| download | linux-next-8f843441c4e7eae8ea83491e8c203c2b192edcf5.tar.gz linux-next-8f843441c4e7eae8ea83491e8c203c2b192edcf5.zip | |
ipvs: properly update the overload flag on dest edit
The upper/lower connection thresholds for dest can be changed,
so use ip_vs_dest_update_overload() to properly update the
dest overload flag.
The thresholds were not limited, fit them in the 0 .. INT_MAX
range as already done in ipvsadm.
As the thresholds are also read when connections are created
and expired, use WRITE_ONCE/READ_ONCE to access them.
As the lower threshold is optional, use (u - (u >> 2)) to
calculate the 75% default value based on the upper threshold
by preserving the integer rounding, as suggested by Yizhou Zhao.
Trigger flag update when totalconns reaches one of the
thresholds and use dst_lock to serialize the updating.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Yizhou Zhao <zhaoyz24@mails.tsinghua.edu.cn>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/memory')
0 files changed, 0 insertions, 0 deletions
