Commit Graph
14 Commits
Author SHA1 Message Date
DmitriiandNikos Mavrogiannopoulos df086188d7 radius: send the session ID as Acct-Session-Id in the Access-Request
RFC 2866 (5.5) allows an Access-Request to carry Acct-Session-Id and
requires the same value in the session's Accounting-Requests. Sending it
already at authentication time lets the RADIUS server correlate the two
exchanges by a single per-session key (e.g. for rlm_ippool, so concurrent
sessions of the same user from the same client do not collide on one IP
lease).

Documented as REQ-AUTH-AUTH-025, with a positive check in tests/radius
that the id sent as Acct-Session-Id in the Access-Request matches the
Accounting-Request.

Signed-off-by: Dmitrii <dimmispencer@gmail.com>
Resolves: #751
2026-07-14 21:40:23 +02:00
Nikos Mavrogiannopoulos eeef24e520 tests: do not skip if /usr/sbin/ip is missing
This is to prevent an accidental skipping of the test.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-06-11 15:40:37 +02:00
Dimitri Papadopoulos 34be9e368e tests: whichcommand -v
Use `command -v` instead of `which` because:
* It's built into the shell, avoiding an external dependency on the
  `which` package on Fedora 44.
* It works across all POSIX-compliant shells.
* It's standard across Linux distributions. For example, Fedora 44
  lacks the `which` package by default.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2026-05-31 14:17:33 +02:00
Nikos Mavrogiannopoulos 5148c723cb tests: fix flaky radius tests by waiting for server readiness
All six radius tests used a fixed sleep 4 after starting radiusd and
ocserv.  On slow or ASAN-instrumented hosts (CentOS 10 CI) this is
insufficient: freeradius with -xx debug logging takes longer than 4
seconds to load its modules, and even after binding UDP 1812 it continues
initializing its user database before it can process auth requests.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-04-25 17:20:38 +02:00
Nikos Mavrogiannopoulos 1b8f7f8ede tests: introduced helper to have uniform termination of client and server
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-03-22 12:29:59 +01:00
Nikos Mavrogiannopoulos df6cfdd64e tests: radius: auto-generate the freeradius config directory
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2026-03-20 20:47:35 +01:00
Nikos Mavrogiannopoulos bc4b1c5f12 tests: auto-generate random addresses instead of hard-coding them
The main benefit is that there is less manual work to add a
test (discovery of unique random addresses is not necessary),
but it also ensures that the tests can run on environments where the
previously hard-coded addresses were present.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-29 21:18:28 +01:00
Nikos Mavrogiannopoulos 21e35358b4 tests: improved radius log presentation
Include the radiusd output with debugging information on stdout
for the radius tests. This allows better visibility to potential
configuration issues of radiusd.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-12-29 16:38:03 +01:00
Nikos Mavrogiannopoulos 02442aabbc Replaced nuttcp tests with iperf3
iperf3 is consistently included in all distributions we
are testing at, in contrast with nuttcp.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-07-27 15:50:33 +02:00
Nikos Mavrogiannopoulos a7c3c4f1bc Regenerated expired certificates and updated scripts for new ones
Also added rules and templates to regenerate certificates when
needed.

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2023-06-02 06:15:45 +02:00
Dimitri Papadopoulos f28669bf60 Remove spaces
* Remove trailing spaces at end-of-line
* Remove blank lines at end-of-file

Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2022-11-28 11:22:33 +01:00
Nikos Mavrogiannopoulos b2c0c6c1cf tests: replaced explicit ports with random assignment
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-08-09 13:14:22 +02:00
Nikos Mavrogiannopoulos a8d34a80b9 tests: radius: save log on CI failure
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-02-13 22:25:13 +01:00
Nikos Mavrogiannopoulos 15380220ac tests: rewrite the radius tests using namespaces
This simplifies the test and makes it runnable in our CI.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
2019-06-03 22:47:23 +02:00