]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add TCP tests for radclient developer/alandekok
authorAlan T. DeKok <aland@freeradius.org>
Fri, 17 Jul 2026 12:37:25 +0000 (08:37 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 17 Jul 2026 12:37:25 +0000 (08:37 -0400)
which test both the client functionality and the server

src/tests/radclient/auth_tcp.out [new file with mode: 0644]
src/tests/radclient/auth_tcp.txt [new file with mode: 0644]
src/tests/radclient/config/radiusd.conf

diff --git a/src/tests/radclient/auth_tcp.out b/src/tests/radclient/auth_tcp.out
new file mode 100644 (file)
index 0000000..c4665bb
--- /dev/null
@@ -0,0 +1,5 @@
+Sent Access-Request Id 123 from 127.0.0.1:61714 to 127.0.0.1:12760 length 61 
+        User-Name = "bob"
+        User-Password = "hello"
+Received Access-Accept Id 123 from 127.0.0.1:12760 to 127.0.0.1:61714 via (null) length 38 
+(0) src/tests/radclient/auth_tcp.txt response code 2
diff --git a/src/tests/radclient/auth_tcp.txt b/src/tests/radclient/auth_tcp.txt
new file mode 100644 (file)
index 0000000..01d6d67
--- /dev/null
@@ -0,0 +1,5 @@
+#
+#      ARGV: -i 123 -c 1 -x -F -P tcp
+#
+User-Name = "bob",
+User-Password = "hello"
index f5fbb8e9605f038d5507b8e2d609602f6cd4895d..95558a52a527db1ce91cbcbb0862e85603b2e7c6 100644 (file)
@@ -126,6 +126,7 @@ server test {
                type = Access-Request
                type = Accounting-Request
 
+                transport = udp
                 udp {
                         ipaddr = *
                         port = ${test_port}
@@ -134,7 +135,32 @@ server test {
                                 allow = 0.0.0.0/0
                         }
                 }
-                transport = udp
+
+                #
+                #  Dynamic client section
+                #
+                limit {
+                        max_clients = 0
+                        max_connections = 0
+                        idle_timeout = 600.0
+                        nak_lifetime = 10.0
+                        cleanup_delay = 5.0
+                }
+        }
+
+       listen {
+               type = Access-Request
+               type = Accounting-Request
+
+                transport = tcp
+                tcp {
+                        ipaddr = *
+                        port = ${test_port}
+                        dynamic_clients = true
+                        networks {
+                                allow = 0.0.0.0/0
+                        }
+                }
 
                 #
                 #  Dynamic client section