<feed xmlns='http://www.w3.org/2005/Atom'>
<title>accel-ppp.git/accel-pppd/logs, branch 1.15.0</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=1.15.0</id>
<link rel='self' href='https://git.amelek.net/accel-ppp/accel-ppp.git/atom?h=1.15.0'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/'/>
<updated>2026-10-28T12:35:29+00:00</updated>
<entry>
<title>log: bound log lines and share target unpacking</title>
<updated>2026-10-28T12:35:29+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-10-28T12:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=58e399400c4ef4b71472ab7c2c71c54a677a05a8'/>
<id>urn:sha1:58e399400c4ef4b71472ab7c2c71c54a677a05a8</id>
<content type='text'>
A log line is flushed only when its text ends in a newline, so it can be
assembled from any number of log calls. Packet printers make one call per
attribute, so a single line could grow far beyond LOG_MAX_SIZE, while the
tcp, syslog and pgsql targets each copied the whole chunk list into a
fixed size buffer without checking its length.

Cap the accumulated line at LOG_MAX_SIZE in do_log(), keeping the
trailing newline so the line is still flushed, and replace the three
duplicated unpack loops with log_unpack_msg(), which never writes past
the size it is given. The syslog bound is needed on its own: a session
header plus a full length line does not fit its buffer.

Also skip empty formatted strings, which made do_log() read the byte
before its buffer.

When a single call is cut short by vsnprintf its newline is lost; restore
it when the format ends in one, so the line is closed instead of
swallowing the next one. The syslog and pgsql targets now strip the
trailing newline only when it is there, instead of dropping the last
character of a line cut to fit.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>log_pgsql: deprecate the module and rename its build flag</title>
<updated>2026-08-11T21:40:07+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-08-11T21:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=428333c9bb283ceb998332481867a59e7cea33b4'/>
<id>urn:sha1:428333c9bb283ceb998332481867a59e7cea33b4</id>
<content type='text'>
The PostgreSQL logging target sees little use and has been a source of
memory safety bugs. Mark it as deprecated and scheduled for removal, but
give anyone depending on it a chance to object first.

To make sure this is not missed, the LOG_PGSQL build flag now fails the
build with an explanation, building the module requires the renamed
LOG_PGSQL_DEPRECATED flag, cmake prints a warning when it is used, and the
module logs a deprecation warning on startup.
</content>
</entry>
<entry>
<title>utils: centralize min macro</title>
<updated>2026-08-11T18:42:07+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-08-11T18:37:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=1c69485e1ebd17bf3cc6e8fc4728f9bdb431de94'/>
<id>urn:sha1:1c69485e1ebd17bf3cc6e8fc4728f9bdb431de94</id>
<content type='text'>
Several userspace translation units carry identical local min() definitions. Move the guarded definition to utils.h and include it from each user so there is one implementation to maintain.

The Linux min() macro lives in kernel-internal headers and is not part of the userspace UAPI. Clang/LLVM does not provide a compatible min macro either: C++ code uses std::min and Clang's similarly named operations use explicit builtin names. The userspace &lt;sys/param.h&gt; interface, where available, exposes uppercase MIN instead.

Keep the #ifndef guard to preserve the behavior of the existing local definitions and avoid redefining a lowercase min macro supplied by an unrelated third-party header.
</content>
</entry>
<entry>
<title>log_pgsql: bound username and sessionid in log header</title>
<updated>2026-08-11T18:00:46+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-08-11T18:00:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=bb62ae7b29a20f7c2d4e26b9f5ad330f1bcc3d73'/>
<id>urn:sha1:bb62ae7b29a20f7c2d4e26b9f5ad330f1bcc3d73</id>
<content type='text'>
set_hdr() copied the session username and sessionid into the message
header chunk with strcpy(). That chunk comes from chunk_pool and holds
only LOG_CHUNK_SIZE + 1 bytes, while the username is peer supplied and
may be up to 255 bytes long (PAP), so a long username overflowed the
chunk and corrupted the heap when log-pgsql was enabled.

Use snprintf() to truncate both fields to the space left in the chunk.
</content>
</entry>
<entry>
<title>log_file: don't register general target when log-file is unset</title>
<updated>2026-06-04T14:45:50+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-06-04T14:43:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=5fc07183e90b5ce7c9d3ede955266ba575388965'/>
<id>urn:sha1:5fc07183e90b5ce7c9d3ede955266ba575388965</id>
<content type='text'>
The general log target was registered unconditionally in init(), even
when no log-file= option was configured. The backing log_file pointer is
only allocated when the option is present, so the first general-routed
log message dereferenced NULL in queue_log() (spin_lock(&amp;NULL-&gt;lock)),
crashing the daemon. This made commenting out log-file= a foot-gun.

Guard the registration on log_file being allocated, mirroring how the
fail/per-user/per-session targets are already conditional. Also bail out
of general_reopen() early when log-file is unset, so a SIGHUP after a
config reload that dropped log-file can't call open(NULL, ...).
</content>
</entry>
<entry>
<title>fix: typo, dont close wrong descriptor</title>
<updated>2026-04-30T20:20:15+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2026-04-30T20:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=e8447ad76665ca6a74f9da7a56aa24027c5ee414'/>
<id>urn:sha1:e8447ad76665ca6a74f9da7a56aa24027c5ee414</id>
<content type='text'>
Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>build: fix compile errors on GCC 14</title>
<updated>2024-08-27T22:41:58+00:00</updated>
<author>
<name>Sergey V. Lobanov</name>
<email>sergey@lobanov.in</email>
</author>
<published>2024-08-27T21:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=966c2bc8df039c67f4711ba9bb3f267fbd405c8d'/>
<id>urn:sha1:966c2bc8df039c67f4711ba9bb3f267fbd405c8d</id>
<content type='text'>
This patch fixes compile errors on GCC 14 like the following

/root/accel-ppp/accel-pppd/radius/packet.c: In function 'rad_packet_recv':
/root/accel-ppp/accel-pppd/radius/packet.c:142:72: error: passing argument 5 of 'recvfrom' from incompatible pointer type [-Wincompatible-pointer-types]
  142 |                         n = recvfrom(fd, pack-&gt;buf, REQ_LENGTH_MAX, 0, addr, &amp;addr_len);
      |                                                                        ^~~~
      |                                                                        |
      |                                                                        struct sockaddr_in *
In file included from /usr/include/netinet/in.h:10,
                 from /usr/include/arpa/inet.h:9,
                 from /root/accel-ppp/accel-pppd/radius/packet.c:10:
/usr/include/sys/socket.h:397:55: note: expected 'struct sockaddr * restrict' but argument is of type 'struct sockaddr_in *'

Reference: https://gcc.gnu.org/gcc-14/porting_to.html
</content>
</entry>
<entry>
<title>log_tcp: Fix small memory leak</title>
<updated>2024-04-11T22:23:50+00:00</updated>
<author>
<name>Denys Fedoryshchenko</name>
<email>denys.f@collabora.com</email>
</author>
<published>2024-04-11T22:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=115c88b1ded6fe2c499c767b69b27c1e8a4dc449'/>
<id>urn:sha1:115c88b1ded6fe2c499c767b69b27c1e8a4dc449</id>
<content type='text'>
Discovered using clang sanitizers.

Signed-off-by: Denys Fedoryshchenko &lt;denys.f@collabora.com&gt;
</content>
</entry>
<entry>
<title>T46: Fix per-user-dir logging</title>
<updated>2021-09-03T23:41:36+00:00</updated>
<author>
<name>DmitriyEshenko</name>
<email>dmitriy.eshenko@vyos.io</email>
</author>
<published>2021-09-03T23:41:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=2117fb22a60973e773ccf97c17cd2b48e78f6d76'/>
<id>urn:sha1:2117fb22a60973e773ccf97c17cd2b48e78f6d76</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T43: Change to list_for_each_safe to prevent segmentation fault</title>
<updated>2021-06-30T19:47:41+00:00</updated>
<author>
<name>DmitriyEshenko</name>
<email>snooppy@mail.ua</email>
</author>
<published>2021-06-30T19:29:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/accel-ppp/accel-ppp.git/commit/?id=aa9e2eefe4ad51ba6a61ba10abe7dc1ef277700d'/>
<id>urn:sha1:aa9e2eefe4ad51ba6a61ba10abe7dc1ef277700d</id>
<content type='text'>
</content>
</entry>
</feed>
