2 Commits
Author SHA1 Message Date
Alex Protsko b931112cb2 worker-privs: allow munmap/mremap/madvise for isolated workers
Fix worker crashes on musl-based systems when isolate-workers = true by allowing munmap, mremap, and madvise in the worker seccomp filter.

Move seccomp coverage to Alpine CI and use oc_syslog for seccomp trap diagnostics instead of direct write()-based output.

Keep glibc backtrace diagnostics as the default and allow musl builds to select the syscall-only fallback with the assume-glibc Meson option.

Resolves: #749
Signed-off-by: Alex Protsko <fidget2015@yahoo.com>
2026-07-20 16:43:23 +03:00
Alex ProtskoandNikos Mavrogiannopoulos 5a50aecedc Fix inflated RADIUS Acct-Session-Time across reconnects
A session that reconnects under the same cookie (roaming, DPD, a new-tunnel
rekey) reported an Acct-Session-Time far larger than the real duration. Each
connection segment reported uptime measured from the original session start
(now - e->created, as session_start_time is not reset across reconnects), and
sec-mod summed these per-segment cumulative values, so the reported time grew
~= D*(N+1)/2 with the number of reconnects.

Acct-Session-Time is the wall-clock lifetime of the logical session and is a
pure function of the session creation time, so it does not need to be reported
by the worker, carried through cli_stats_msg / secm_session_close_msg, or
accumulated alongside the byte counters. Drop stats_st.uptime and the uptime
fields of both IPC messages, and compute it in sec-mod as now - e->created:
live for each interim update, and snapshotted at disconnect for the Stop so the
cookie-timeout lingering period is not counted. The byte counters keep their
per-segment report-and-sum handling.

Signed-off-by: Alex Protsko <fidget2015@yahoo.com>
2026-07-12 13:55:59 +02:00