Files
ocserv/tests
Nikos Mavrogiannopoulos 96aa1f5ae7 tests: add reproducer for inflated RADIUS Acct-Session-Time across reconnects
A session that reconnects several times under the same cookie (roaming,
DPD, a new-tunnel rekey) currently reports an Acct-Session-Time far
larger than its real duration: each reconnected segment reports uptime
measured cumulatively from the original session start, and sec-mod sums
these cumulative per-segment values instead of taking the final one.

Add a test that drives three cookie-resumed segments (simulating
reconnects via SIGKILL, as tests/test-cookie-timeout does, so the
session survives between segments) with idle gaps in between, then
performs a clean final disconnect (SIGTERM), which ocserv reports as an
explicit user disconnect and closes the accounting session immediately.
It checks the Stop record's Acct-Session-Time is close to the real
elapsed wall-clock time rather than the sum of the individual segments'
cumulative uptimes.

This test currently fails against unpatched master.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-07-12 13:55:55 +02:00
..
2026-05-31 14:17:33 +02:00
2022-11-28 11:22:33 +01:00
2023-06-10 16:21:34 +08:00
2021-11-01 10:23:01 +01:00
2026-05-01 19:26:45 +00:00
2023-06-10 16:21:34 +08:00
2022-11-28 11:22:33 +01:00
2026-05-31 14:17:33 +02:00
2026-05-31 14:17:33 +02:00
2026-05-31 14:17:33 +02:00
2026-05-31 14:17:33 +02:00
2023-06-10 16:21:34 +08:00
2023-06-10 16:21:34 +08:00
2026-05-31 14:17:33 +02:00
2026-05-31 14:17:33 +02:00