<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/ppp, 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-18T21:55:50+00:00</updated>
<entry>
<title>Merge pull request #330 from nuclearcat/ipv6cp-term-fix</title>
<updated>2026-07-18T21:55:50+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-18T21:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=779c2d0233559bac9e00e1f62d10c13218f90bee'/>
<id>urn:sha1:779c2d0233559bac9e00e1f62d10c13218f90bee</id>
<content type='text'>
ppp: don't terminate session on IPV6CP TermReq unless IPv6 is required</content>
</entry>
<entry>
<title>Merge pull request #334 from nuclearcat/ppp-unit-fd-close-race</title>
<updated>2026-07-18T21:55:36+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-18T21:55:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=214be6067128e5c1982c0b4ab1a950c287b05e3e'/>
<id>urn:sha1:214be6067128e5c1982c0b4ab1a950c287b05e3e</id>
<content type='text'>
ppp: close unit fd only after session cleanup finishes</content>
</entry>
<entry>
<title>ipv6cp: fix byte order of default interface-id values</title>
<updated>2026-07-12T20:11:39+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-12T20:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=1c43c26d5c87df722141ad6a37f068968a9a6b5b'/>
<id>urn:sha1:1c43c26d5c87df722141ad6a37f068968a9a6b5b</id>
<content type='text'>
The default fixed interface-ids conf_intf_id_val=1 and
conf_peer_intf_id_val=2 were plain host-order integers, while every
consumer (build_ip6_addr(), ifcfg.c, nd.c, dhcpv6.c) treats intf_id as
an opaque 8-byte value in network byte order and copies it verbatim
into the low 64 bits of the IPv6 address. parse_intfid() also produces
network byte order, so only the built-in defaults were affected.

On little-endian hosts this produced fe80::100:0:0:0 (and ::200:0:0:0
for the peer) instead of the intended fe80::1 / ::2 whenever
ipv6-intf-id / ipv6-peer-intf-id were not set in the config.

Store the defaults with htobe64() so the resulting addresses are ::1
and ::2 regardless of host endianness. The assignment is done in
init() because htobe64() is not a constant expression on all libcs.

Note: on little-endian deployments this changes the server link-local
address from fe80::100:0:0:0 to fe80::1 when ipv6-intf-id is unset.
</content>
</entry>
<entry>
<title>ppp: close unit fd only after session cleanup finishes</title>
<updated>2026-07-08T10:21:14+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-06T16:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=1d67a133e31cfe0c6cff01a3417c1e7eb4eb6e38'/>
<id>urn:sha1:1d67a133e31cfe0c6cff01a3417c1e7eb4eb6e38</id>
<content type='text'>
destablish_ppp() closed the ppp unit fd (via
triton_md_unregister_handler(..., 1)) before calling
ap_session_finished(). Closing the fd releases the ppp unit index, so
the kernel can assign the same unit (and thus the same pppX ifname) to
a new session while the old session's cleanup is still running.

pppd_compat performs its cleanup from the EV_SES_FINISHED handler: it
runs the ip-down script (blocking the context until the script exits)
and then deletes radattr.pppX. If the unit index is reused in that
window, the ip-down script is executed with an IFNAME that now belongs
to a different, active session, and remove_radattr() deletes the
radattr file of that new session. External accounting/shaper scripts
that read radattr.pppX then fail for a live session.

Fix this by unregistering the unit fd handler without closing the fd
and closing it only after ap_session_finished() returns, unless the fd
was handed to the unit cache. This keeps the unit index reserved until
session cleanup has finished, so the ifname cannot be reused early.

The unit-cache path is not affected (the cached fd already keeps the
unit reserved); the race only hits configurations with unit-cache
disabled. Only PPP sessions (PPPoE/PPTP/L2TP/SSTP) go through this
path; IPoE is unaffected. Note the unit index is now held slightly
longer during teardown (while ip-down runs) - this is intentional.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: don't terminate session on IPV6CP TermReq unless IPv6 is required</title>
<updated>2026-07-06T21:51:44+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-07-06T21:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=a9dd25763194f0df41f2a0c2b135f5c872886ae4'/>
<id>urn:sha1:a9dd25763194f0df41f2a0c2b135f5c872886ae4</id>
<content type='text'>
Some broken CPE routers (e.g. Phicomm KE2M, older Linksys) negotiate
IPV6CP successfully but then fail to configure IPv6 locally and send
IPV6CP TermReq while intending to keep using the session for IPv4.
accel-ppp currently terminates the whole session on any IPV6CP TermReq,
which violates the RFC 1661 section 3.7 implementation note:

  "the fact that one NCP has Closed is not sufficient reason to cause
   the termination of the PPP link, even if that NCP was the only NCP
   currently in the Opened state."

Terminate the session only when ipv6=require. Otherwise mark the layer
passive so session bring-up can proceed if IPV6CP never started.

The TermReq handler change alone is not enough for these routers: they
send TermReq *after* IPV6CP has opened, so ipv6cp-&gt;started is already
set and ipv6cp_layer_finished() (reached via TermAck or the restart
timer once the FSM winds down through Stopping-&gt;Stopped) would still
kill the session through its started branch. Apply the same policy
there: only terminate if ipv6=require, otherwise log and keep the
session running IPv4-only.

In require mode the TermReq path still records TERM_USER_REQUEST as
before (and sets ses-&gt;terminating, so layer_finished doesn't override
the cause); TERM_USER_ERROR in layer_finished now only covers genuine
negotiation failures.

Based on the fix proposed by Marek Michalkiewicz and reworked by
Alarig Le Lay.

Closes: https://github.com/accel-ppp/accel-ppp/issues/57
Supersedes: https://github.com/accel-ppp/accel-ppp/pull/298

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: Defend from possible ppp init failure</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T22:06:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=7ad4f3974448ddd890664e95b2a17feff3b4f7d3'/>
<id>urn:sha1:7ad4f3974448ddd890664e95b2a17feff3b4f7d3</id>
<content type='text'>
ppp init might fail due malloc failure, missing or invalid runtime state, failure to setup
resources (sockers, timers, handler registration), etc.
This is quite unlikely now, but some floating(hard to catch) bugs says
better to be safe than sorry.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>fix(ppp): Uninitialized struct fields</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T21:59:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=7cf817907283cf3a6495c6c5a028f5f6651e4f4b'/>
<id>urn:sha1:7cf817907283cf3a6495c6c5a028f5f6651e4f4b</id>
<content type='text'>
Initialized the ifreq in destablish_ppp to avoid the uninitialized-struct
warning before use.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: classic TOCTOU, as uc_size not guarded by mutex</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T21:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=474eba540738838dbb9d21cc1eb705c6ef060b94'/>
<id>urn:sha1:474eba540738838dbb9d21cc1eb705c6ef060b94</id>
<content type='text'>
It was a micro-optimization to skip taking the mutex when uc_size was 0.
But because uc_size isnt atomic and wasnt read under the lock, it created a TOCTOU window.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>ppp: guard LCP logging field reads</title>
<updated>2026-02-06T15:34:54+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-01-25T21:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=e81ef1824ca33aa977fda7fd0ef02052a5186675'/>
<id>urn:sha1:e81ef1824ca33aa977fda7fd0ef02052a5186675</id>
<content type='text'>
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>
</feed>
