Commit Graph
15 Commits
Author SHA1 Message Date
Dimitri Papadopoulos 81d2354def Special case for IPv4 point-to-point /31 networks
RFC 3021 makes an exception for /31 networks: the network and brodacast
addresses are not reserved, since they are not needed in a point-to-point
context, and a /31 network contains only two addreses.

In that case, start at network address instead of network address + 1.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2026-05-19 23:17:22 +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
Dimitri PapadopoulosandNikos Mavrogiannopoulos ab58d9e9d7 Retrieve connection speed from RADIUS
Hijack Roaring Penguin's RADIUS attributes for that purpose:
* RP-Upstream-Speed-Limit → rx_per_sec
* RP-Downstream-Speed-Limit → tx_per_sec

While the ocserv configuration options use b/s, ocserv uses kb/s
internally. The radius attributes are already expressed in kb/s,
so we don't need to convert them.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
2024-01-20 20:12:34 +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 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
Alan Jowett 3436705a9c Allow setup of new DTLS session while processing on old session
Resolves: #359

Signed-off-by: Alan Jowett alan.jowett@microsoft.com
2020-10-19 10:36:03 -06: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 MavrogiannopoulosandNikos Mavrogiannopoulos 6f3b20f17b radius-config: stability updates
Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
2020-06-29 12:06:35 +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
Lele Long 17ed47488d Add udp-listen-host option for DTLS
This option supports different listen addresses for tcp and
udp such as haproxy for tcp, but support dtls at the same time (haproxy
does not support UDP at the moment)
2019-09-30 09:01:55 +08: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