<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/cli/std_cmd.c, branch sstp-alloc-invariant</title>
<subtitle>High performance PPTP/L2TP/SSTP/PPPoE/IPoE server for Linux (mirror of https://github.com/accel-ppp/accel-ppp.git)
</subtitle>
<id>https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=sstp-alloc-invariant</id>
<link rel='self' href='https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=sstp-alloc-invariant'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/'/>
<updated>2026-07-07T23:53:26+00:00</updated>
<entry>
<title>triton: reject concurrent config reload requests</title>
<updated>2026-07-07T23:53:26+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-07T22:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=844812959beb1a6bbcc64099a4f85b3db127a8a4'/>
<id>urn:sha1:844812959beb1a6bbcc64099a4f85b3db127a8a4</id>
<content type='text'>
triton_conf_reload() kept the notify callback in a single global slot,
and the CLI reload command likewise stored its wakeup context in a
global. A second reload issued while the first was still pending (from
another CLI connection or SIGUSR1) overwrote both, so only the last
requester was notified when the reload completed; the earlier CLI
context slept forever in triton_context_schedule() and that connection
hung while the rest of the daemon kept running.

Make triton_conf_reload() return -1 when a reload is already pending,
checked atomically under threads_lock, and pass a caller-provided arg
through to the notify callback so each requester keeps its own state
instead of sharing globals. The CLI reload's request struct is
heap-allocated rather than kept on reload_exec's stack, since
triton_context_schedule() can migrate a suspended context onto a
different worker thread's stack before the notify callback runs,
which would otherwise leave conf_reload_notify() writing through a
stale stack pointer.

Also mark the reload as running (need_config_reload = 2) before
dropping threads_lock to call __config_reload(). Previously a worker
woken during the reload (e.g. by the notify callback waking the CLI
context, or any stray context wakeup) could loop through the idle
path, decrement the active count back to zero and re-enter
__config_reload() while need_config_reload was still set, running a
second concurrent conf_reload() and invoking the notify callback
twice - corrupting the wakeup list and, with the CLI's heap request,
writing through freed memory.

The SIGUSR1 handler used to call triton_conf_reload() directly from
signal context, taking spinlocks and potentially running the whole
config parse inside the handler. It now only sets a flag; the main
thread waits with sigtimedwait() and performs the reload (and logs a
warning when one is already in progress) from normal thread context.
The CLI now replies "reload is already in progress" instead of losing
the first requester's wakeup.
</content>
</entry>
<entry>
<title>triton: encapsulate statistics counters</title>
<updated>2026-05-04T00:09:49+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-04-29T12:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=e5fe0eaa1fc6b1109db784e818e360159d8dd2ac'/>
<id>urn:sha1:e5fe0eaa1fc6b1109db784e818e360159d8dd2ac</id>
<content type='text'>
Group the Triton core statistics in struct triton_stat_t and keep the storage private to triton.c instead of exporting the writable triton_stat object through triton.h. This keeps ownership inside the Triton core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics.

Route counter updates through triton_stat_*() helpers. Thread, context, md handler, timer, mempool, CPU, and start-time update paths no longer open-code direct triton_stat mutations; the update policy now lives beside the Triton-owned storage and uses relaxed atomic operations for the simple counters.

Make the CLI show-stat path render from a local snapshot and update statCore SNMP readers to use triton_stat_start_time() and triton_stat_cpu(). Out-of-tree modules that accessed the exported triton_stat object directly must switch to the new accessors, because triton_stat is no longer part of the public ABI.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>session: encapsulate statistics counters</title>
<updated>2026-05-04T00:09:49+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-04-29T12:21:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=d6383d69813cf2244f31d8116176733ffbbeaceb'/>
<id>urn:sha1:d6383d69813cf2244f31d8116176733ffbbeaceb</id>
<content type='text'>
Group the core session starting, active, and finishing statistics behind the private ap_session_stat storage in session.c instead of exposing writable counters through ap_session.h. This keeps ownership inside the session core while preserving the existing CLI and ACCEL-PPP-MIB counter semantics.

Route session counter updates through ap_session_stat_*() helpers. Session start, activation, termination, finish, and shutdown-idle paths no longer open-code individual counter increments/decrements; the update policy now lives beside the session-owned storage and uses relaxed atomic operations for the simple state counters.

Make the CLI show-stat path render from a local snapshot and convert the PPP SNMP starting/active/finishing scalars from watched raw pointers to scalar handlers. PPP controllers now read max-session limits through ap_session_stat_starting() and ap_session_stat_active(), removing external direct access to ap_session_stat.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>mempool: Fix 32-bit stats</title>
<updated>2025-11-23T17:57:55+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2025-11-23T17:57:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=66cad4ffb12fec261a476661393167c7426c29d8'/>
<id>urn:sha1:66cad4ffb12fec261a476661393167c7426c29d8</id>
<content type='text'>
We are living in 64-bit world long time, so there is very likely mempool
stats might overflow past 4GB and report incorrect values.
Updated mempool stats to use 64-bit counters so they don’t
wrap past 4 GB and print correctly in CLI.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>migrate from pcre to pcre2</title>
<updated>2024-09-02T12:42:58+00:00</updated>
<author>
<name>Sergey V. Lobanov</name>
<email>sergey@lobanov.in</email>
</author>
<published>2024-09-01T08:59:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=cbfa3efe7ae135b4ae8890485701677f56087f50'/>
<id>urn:sha1:cbfa3efe7ae135b4ae8890485701677f56087f50</id>
<content type='text'>
PCRE is not supported anymore and removed from several distros
</content>
</entry>
<entry>
<title>Fixed typos in cli help.</title>
<updated>2021-10-05T12:21:00+00:00</updated>
<author>
<name>soup</name>
<email>soup@tfwno.gf</email>
</author>
<published>2021-10-05T12:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=6898f8b89fdb8dd1360a57433d77309d5ea67bfb'/>
<id>urn:sha1:6898f8b89fdb8dd1360a57433d77309d5ea67bfb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>cli: fix absent OK status for 'show version'</title>
<updated>2021-05-25T12:37:17+00:00</updated>
<author>
<name>Vladislav Grishenko</name>
<email>themiron@mail.ru</email>
</author>
<published>2021-05-25T12:37:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=26ea71ec55687d897c9aabed22ebaec67dbe56a3'/>
<id>urn:sha1:26ea71ec55687d897c9aabed22ebaec67dbe56a3</id>
<content type='text'>
fix 4b52c1a3590b43ca892c460d9b1478e1da742156
</content>
</entry>
<entry>
<title>Add 'show version' command in CLI</title>
<updated>2021-04-27T11:10:03+00:00</updated>
<author>
<name>root</name>
<email>voitov.e@gmail.com</email>
</author>
<published>2021-04-27T11:10:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=4b52c1a3590b43ca892c460d9b1478e1da742156'/>
<id>urn:sha1:4b52c1a3590b43ca892c460d9b1478e1da742156</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix build with non-portable _SC_PAGE_SIZE</title>
<updated>2021-02-06T10:24:29+00:00</updated>
<author>
<name>Vladislav Grishenko</name>
<email>themiron@mail.ru</email>
</author>
<published>2021-02-06T10:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=b1ad6a35a605e9491b8492b5af525994d189d09e'/>
<id>urn:sha1:b1ad6a35a605e9491b8492b5af525994d189d09e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>accel-ppp Debian x32 fix minor -Wformat warnings</title>
<updated>2016-05-31T09:38:21+00:00</updated>
<author>
<name>Marek Michalkiewicz</name>
<email>marekm@amelek.gda.pl</email>
</author>
<published>2016-05-28T21:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=74d9a93067733e61d27038b905bf0f8325a102b5'/>
<id>urn:sha1:74d9a93067733e61d27038b905bf0f8325a102b5</id>
<content type='text'>
Hello,

small patch to avoid gcc -Wformat warnings on Debian x32 where time_t
is "long long" (64-bit signed, to be 2038 safe), not "unsigned long"
(32-bit unsigned) corresponding to "%lu" format strings.

Regards,
Marek
</content>
</entry>
</feed>
