<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/radius/acct.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-06T09:44:52+00:00</updated>
<entry>
<title>radius: fix permanent socket leak in Acct-Stop retry path</title>
<updated>2026-07-06T09:44:52+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-06T09:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=8a94a47e8068dbc8b308cea0b875c516d2ad13f5'/>
<id>urn:sha1:8a94a47e8068dbc8b308cea0b875c516d2ad13f5</id>
<content type='text'>
When an accounting Stop request cannot be retransmitted because no
server is available (single server inside its fail-timeout window,
server removed on config reload, or a transient socket/connect error
that marks the server failed), rad_acct_stop_timeout() reset req-&gt;try
and returned. The retransmit timer is one-shot (no period), so it
never fired again: the request leaked forever together with its open
UDP socket, epoll registration and timerfd.

The same dead end existed in rad_acct_stop_sent(): a deferred Stop
request (req-&gt;rpd == NULL) whose queued send was cancelled by
rad_server_fail() fell through the failure branch without freeing the
request or scheduling a retry.

With the RADIUS client bound to a source address (bind=/nas-ip-address)
every leaked socket pins one ephemeral port. On a busy NAS each session
terminating during a short RADIUS outage leaks one socket; after months
of uptime the ephemeral port range is exhausted and every new request
fails with "radius:bind: Address already in use" followed by
"no available servers", requiring a restart.

Fix by re-arming the one-shot timer on send failure instead of
resetting the try counter, so retries are bounded by max-try and the
request is freed cleanly once attempts are exhausted.

Both defects date back to the accounting rewrite (62e89248, 2014).

Fixes: https://github.com/accel-ppp/accel-ppp/issues/324

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>radius: update server secret on config reload</title>
<updated>2026-06-05T19:42:06+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-06-05T19:30:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=950dad62c7544dd42de319db29c4f57bd867971a'/>
<id>urn:sha1:950dad62c7544dd42de319db29c4f57bd867971a</id>
<content type='text'>
On EV_CONFIG_RELOAD, __add_server() re-parses each server line into a
fresh rad_server_t and, when it matches an existing server by
addr/auth_port/acct_port, copied over only the timeout/limit/bind
fields before freeing the new struct. The freshly parsed secret was
discarded, so editing a shared secret and reloading had no effect until
a full restart. The strdup'd secret on the freed struct was also leaked
on every matched reload.

Adopt the new secret into the existing server (freeing the old one) so
secret changes take effect on reload. New requests read
req-&gt;serv-&gt;secret directly, so they pick up the update immediately.
This covers both the modern "server=" path and the legacy
auth-server/acct-server path, which both funnel through __add_server().
</content>
</entry>
<entry>
<title>radius: encapsulate server 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-29T10:38:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=dd29f19a14a79437928638029bdb43ba1bba8c08'/>
<id>urn:sha1:dd29f19a14a79437928638029bdb43ba1bba8c08</id>
<content type='text'>
Group the per-server RADIUS statistics in struct rad_server_stat_t under rad_server_t.stat instead of keeping auth, accounting, interim, and failure counters as separate fields on rad_server_t.  This keeps the statistics state collected behind one ownership boundary and makes the relationship between the total counters and their rolling accumulators explicit.

Route counter updates through rad_server_stat_*() helpers.  Auth, accounting, interim, and server-failure paths no longer open-code individual counter increments and accumulator updates; the update policy now lives in serv.c with the rest of the RADIUS server accounting logic.

Make the CLI show-stat path render from a local snapshot.  The displayed totals are loaded with relaxed atomic reads, the rolling one-minute/five-minute values are collected in one place, and the in-flight request/queue counters are copied under the server lock before printing.  Future changes to synchronization or accumulator storage can stay inside the snapshot/update helpers instead of leaking into the CLI formatting code.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>radius: fix stop accounting timeout flow and request cleanup</title>
<updated>2026-02-28T06:25:59+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-02-28T06:25:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=bd936f6074b6b6c515cfd40a1c0215b3dfa7889d'/>
<id>urn:sha1:bd936f6074b6b6c515cfd40a1c0215b3dfa7889d</id>
<content type='text'>
When sending accounting STOP requests, the timer callback was
incorrectly set to the START timeout handler.  This caused stop
retries to follow the wrong termination path.

Also clear rpd-&gt;acct_req before freeing on stop timeout/shutdown
failures to avoid leaving a stale pointer.

This bug is very nasty, revealed during stress tests, leading to
memory corruption and other bad stuff when there is noticeable
loss of radius "Stop" packets.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>fix(radius): refresh session stats in req_set_stat</title>
<updated>2025-12-15T20:49:18+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2025-12-15T19:54:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=179a36695c7a3880041ead1c7c421f9d3ed6462f'/>
<id>urn:sha1:179a36695c7a3880041ead1c7c421f9d3ed6462f</id>
<content type='text'>
Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>Merge pull request #279 from nuclearcat/fix-acct</title>
<updated>2025-12-13T15:06:13+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2025-12-13T15:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=2e13b0ccfb3b87955ec1cb141435575d87a09570'/>
<id>urn:sha1:2e13b0ccfb3b87955ec1cb141435575d87a09570</id>
<content type='text'>
acct: Fix losing some data on interface down due wrong sequence</content>
</entry>
<entry>
<title>fix(accounting): preserve last counters on disconnect</title>
<updated>2025-12-13T13:40:59+00:00</updated>
<author>
<name>Dmitriy Eshenko</name>
<email>dmitriy.eshenko@accel-ppp.org</email>
</author>
<published>2025-12-13T13:38:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=8c8ddabc22a523fb129e422baa025d720c3b455b'/>
<id>urn:sha1:8c8ddabc22a523fb129e422baa025d720c3b455b</id>
<content type='text'>
Ensure accounting values include the most recent traffic sample when a session disconnects,
preventing the final interval from being dropped and avoiding under-reported totals in usage/billing.

Big thanks Dmitriy Eshenko for patch and testing

Author: Dmitriy Eshenko &lt;dmitriy.eshenko@accel-ppp.org&gt;
Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>crypto: Removed internal tomcat crypto.</title>
<updated>2025-12-10T17:16:42+00:00</updated>
<author>
<name>Andrii Melnychenko</name>
<email>a.melnychenko@vyos.io</email>
</author>
<published>2025-09-29T16:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=c912d09018828745e3bcba268cd02a611e324d54'/>
<id>urn:sha1:c912d09018828745e3bcba268cd02a611e324d54</id>
<content type='text'>
Signed-off-by: Andrii Melnychenko &lt;a.melnychenko@vyos.io&gt;
</content>
</entry>
<entry>
<title>radius: implemented accounting delay option (acct-delay-start)</title>
<updated>2023-01-27T08:05:26+00:00</updated>
<author>
<name>Dmitry Kozlov</name>
<email>xeb@mail.ru</email>
</author>
<published>2023-01-27T08:05:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=cc8f2bada5635768d425e2fa2bafb095acda8ca9'/>
<id>urn:sha1:cc8f2bada5635768d425e2fa2bafb095acda8ca9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove unused variable.</title>
<updated>2022-11-01T09:44:26+00:00</updated>
<author>
<name>Stephan Brunner</name>
<email>s.brunner@stephan-brunner.net</email>
</author>
<published>2022-11-01T09:44:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=4e86498731a1e31e313e6f60f73344e0506fd29b'/>
<id>urn:sha1:4e86498731a1e31e313e6f60f73344e0506fd29b</id>
<content type='text'>
</content>
</entry>
</feed>
