| Age | Commit message (Collapse) | Author |
|
Add the missing PPPoSEQ install rules and standalone driver metadata. Supply the running kernel release as the default RPM module destination. Extend the rootless install regression to verify Debian/CentOS packaging names, staged module paths, and exclusion after disabling the build flag.
Validation: CTest passes; generated full and standalone DEBs contain ppposeq.ko and have the expected package names. RPM install rules were staged and checked; an RPM archive was not built because rpmbuild is unavailable.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Use the shared DNS storage and production allocator in the DHCPv6 fixture. Check bounded large DNS replies, preserve the repeated-ORO overflow regression, and check domain-list allocation failure in both reply builders. Link ipv6_dns.c and stub the truncation warning. Run the standalone suites and CTest in sanitizer CI, and replace the stale documented failure with current instructions.
Validation: all six standalone suites pass with ASan/UBSan (LCP uses UBSan); both CTest checks pass.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Explain that LUA=TRUE uses FindLua51, while numeric LUA values use non-EXACT FindLua version matching. Name the Lua 5.1 development package required by the test build examples.
Validation: checked against accel-pppd/CMakeLists.txt and the installed FindLua51 module.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Keep the CMake 3.10 project minimum while documenting the newer CLI requirements. Add a build-directory/install-target alternative for older CMake and state the CTest requirement in the test guide.
Validation: shell examples pass bash -n; local documentation links resolve.
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
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 <denys.f@collabora.com>
|
|
cmake: fix kernel module installation
|
|
Additional safeguards
|
|
The tests create the veth pair with 'ip link add ... type veth peer name
...' and let the kernel pick random hardware addresses, then start
accel-pppd right away. On distributions where systemd-udevd rewrites the
address of a freshly created veth (MACAddressPolicy in its .link rules,
seen on Ubuntu 22.04) this is a race: accel-pppd reads the address of the
interface it serves once, at startup, and when udev wins it advertises an
address the interface no longer has.
Discovery still completes - the client copies the advertised address into
its kernel PPPoE session as the peer address - but from then on the two
ends disagree about it, no PPP frame is exchanged in either direction, and
the session dies on LCP timeouts. Every PPPoE session test can fail this
way; test_pppoe_ccp_ipcp_race failed 8 times out of 12 runs in one qemu
Ubuntu-22.04 job.
Create the pair with fixed, locally administered addresses derived from
the name the pair already gets, so udev has nothing to change. The same
job passes 12 out of 12 with this.
This only removes the trigger in the tests. accel-pppd not following the
address of the interface it serves is tracked in #363 and needs a fix of
its own.
|
|
Add standalone regression coverage for DHCPv6 parsing/replies, RADIUS
response authentication/signing, VRF/CoA name bounds, LCP Echo MTU and
pool reuse. Document all 20 reference commits, upstream coverage, author
credits, adaptations and validation limits.
Validation: default userspace Debug build; five standalone suites with
ASan/UBSan (LCP UBSan only), including LeakSanitizer for ASan tests;
existing IPv6 DNS test; git diff --check. All passed.
Baseline duplicate Rapid-Commit and forged Access-Accept assertions fail
as expected. Full privileged session integration was not run.
|
|
Ipcp ccp delay ack
|
|
Serialize the MPPE option through an aligned temporary and exercise mppe=prefer in the existing unauthenticated PPPoE session test.
|
|
Covers the previous commit: with 'mppe=prefer' CCP is non-passive, so it is
still negotiating (and needs one more round trip because pppd rejects the
MPPE option) when pppd, which does not delay IPCP on CCP, sends its IPCP
ConfReq. The test asserts that the session becomes active and that no IPCP
TermAck was sent, reading the negotiation from the accel-pppd debug log.
The check is skipped if the peer happened to send its IPCP ConfReq only
after CCP was done, in that case the race is not exercised.
|
|
Ipoe stale session flush fixes
|
|
Install each module from its real build directory, propagate staged install roots, and fail when kbuild modules_install fails. Add a rootless CTest and CI regression for successful and failed installs.
Best practices followed:
Use the standard CMake DESTDIR and kbuild INSTALL_MOD_PATH staging interfaces:
https://cmake.org/cmake/help/latest/envvar/DESTDIR.html
https://docs.kernel.org/kbuild/modules.html#install-mod-path
Check child command status with execute_process RESULT_VARIABLE:
https://cmake.org/cmake/help/latest/command/execute_process.html
Register repeatable tests with CTest add_test:
https://cmake.org/cmake/help/latest/command/add_test.html
|
|
Three tests around the interfaces the ipoe module creates per session:
- kill accel-pppd with SIGKILL while a dhcp session is up, start it
again and check that the interfaces left behind by the killed
instance are gone,
- remove a session interface with 'ip link del',
- check that 'ip link add ... type ipoe' is refused, since a device
made through rtnetlink would have none of the private state that
IPOE_CMD_CREATE sets up.
They carry the ipoe_driver marker and sit next to the existing ipoe
tests, so the workflows run them in the steps that follow the insmod of
the module. No workflow change is needed.
The [modules] section has to list connlimit and radius before ipoe:
libipoe.so refers to symbols of both, and with a strict dynamic linker
loading it on its own fails with a relocation error instead of a missing
feature. The tests assert that accel-pppd came up, so that this kind of
misconfiguration is not reported as an unrelated cli connection failure.
Restarting accel-pppd needs no explicit synchronisation:
triton_load_modules() runs every DEFINE_INIT() before triton_run()
starts the threads that serve the cli, so by the time accel-cmd 'show
version' is answered the flush registered at DEFINE_INIT(19) has already
run.
Interfaces are compared by ifindex and not by name, because dhclient may
get a new session in the meantime and the fresh interface would reuse
the ipoe0 name. The check that nothing removes the interfaces while no
accel-pppd is running is only printed, not asserted, so that the module
is free to start doing it on its own later on.
|
|
Add an opt-in sessions setting for the JSON metrics renderer. Include session identity, addressing, protocol state, interface context, uptime, and traffic counters while keeping Prometheus output aggregate-only.
The session list is walked with ses_lock held, so report the accounting counters the session last sampled rather than calling ap_session_read_stats(): that issues a synchronous netlink round trip per session, which would stall session setup and teardown for the duration of a scrape, it writes back into the session while only the read lock is held, and it needs the thread local net of the session's namespace, which the metrics context does not have. Counter freshness therefore follows accounting, which the documentation spells out.
Escape malformed UTF-8 in peer supplied strings so a single bad username cannot make the whole document undecodable, and reserve room for the response header in front of the rendered body so a body that can be megabytes is not copied a second time.
Document the privacy-sensitive option in both accel-ppp.conf and the man page, and cover the empty session list, the aggregate-only Prometheus output and the response framing in the metrics integration test.
|
|
Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
|
|
radius and chap-secrets can't work together due to musl library limiations
This patch disables chap-secrets related tests on alpine
ref: https://github.com/accel-ppp/accel-ppp/pull/190#issuecomment-2331036461
|
|
|
|
|
|
Alpine Linux uses musl libc so now accel-ppp is tested under musl
Currently, Alpine Linux doesn't provide a link to the latest stable version
so direct link to Alpine 3.20 is used
Improved musl support might be used to run on platforms like openwrt
without additional patches
|
|
|
|
these test cases will help for pcre2 migration (issue #173)
|
|
|
|
This commit adds tests (using python3 pytest framework):
1. Test basic accel-cmd commands (show version, show stat, etc)
2. Test ipoe shared session up (dhcpv4) without radius
3. Test pppoe discovery (without PADO delay)
4. Test pppoe discovery (without PADO delay)
5. Test pppoe session up (ipv4) without radius
6. Test vlan creation using vlan-mon (pppoe)
These tests require external utils. Please read tests/README.md how to setup
environment, how to run the tests and how to generate coverage report
Also, run-tests.yml contains step-by-step instruction how to run the tests
Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
|