]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
add docs for coa test
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Mar 2024 13:52:27 +0000 (09:52 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 13 Mar 2024 13:52:27 +0000 (09:52 -0400)
src/tests/radclient/coa/README.md [new file with mode: 0644]
src/tests/radclient/coa/coa.txt [new file with mode: 0644]
src/tests/radclient/coa/coa_reply.txt [new file with mode: 0644]
src/tests/radclient/coa/packet.txt [new file with mode: 0644]
src/tests/radclient/coa/reply.txt [new file with mode: 0644]
src/tests/radclient/coa/server_coa.txt [new file with mode: 0644]
src/tests/radclient/coa/server_coa_reply.txt [new file with mode: 0644]

diff --git a/src/tests/radclient/coa/README.md b/src/tests/radclient/coa/README.md
new file mode 100644 (file)
index 0000000..33d5461
--- /dev/null
@@ -0,0 +1,27 @@
+#  Running Receive CoA with radclient
+
+It's a bit messed up.
+
+Edit `raddb/sites-enabled/default`, and change the `recv Access-Request` section:
+
+```
+recv Access-Request {
+    if (&User-Name == "coa") {
+        &Reply-Message := %exec('./build/make/jlibtool', '--mode=execute', './build/bin/local/radclient', '-d', 'raddb/', '-D', 'share/dictionary/', '-xx', '-t', '2', '-F', '-f', 'src/tests/radclient/coa/server_coa.txt,src/tests/radclient/exec/server_coa_reply.txt', 'localhost:37990', 'coa', 'testing123')
+        accept
+    }
+    ...
+```
+
+Then in one terminal window, run the server from the top source directory:
+
+```
+./scripts/bin/radiusd -sf -xx -l stdout
+```
+
+
+Then in another terminal window, run radclient from the top source directory:
+
+```
+COA=src/tests/radclient/coa ./scripts/bin/radclient -xx -c 1 -F -o 37990 -A User-Name -f ${COA}/packet.txt,${COA}/reply.txt,${COA}/coa_reply.txt,${COA}/coa.txt localhost auth testing123
+```
\ No newline at end of file
diff --git a/src/tests/radclient/coa/coa.txt b/src/tests/radclient/coa/coa.txt
new file mode 100644 (file)
index 0000000..77e5763
--- /dev/null
@@ -0,0 +1 @@
+User-Name == "coa"
diff --git a/src/tests/radclient/coa/coa_reply.txt b/src/tests/radclient/coa/coa_reply.txt
new file mode 100644 (file)
index 0000000..c3a7197
--- /dev/null
@@ -0,0 +1 @@
+Packet-Type = CoA-ACK
diff --git a/src/tests/radclient/coa/packet.txt b/src/tests/radclient/coa/packet.txt
new file mode 100644 (file)
index 0000000..798ffc4
--- /dev/null
@@ -0,0 +1,3 @@
+Packet-Type = Access-Request
+User-Name = "coa",
+User-Password = "hello"
diff --git a/src/tests/radclient/coa/reply.txt b/src/tests/radclient/coa/reply.txt
new file mode 100644 (file)
index 0000000..755497a
--- /dev/null
@@ -0,0 +1 @@
+Packet-Type == Access-Accept
diff --git a/src/tests/radclient/coa/server_coa.txt b/src/tests/radclient/coa/server_coa.txt
new file mode 100644 (file)
index 0000000..446900a
--- /dev/null
@@ -0,0 +1 @@
+User-Name = "coa"
diff --git a/src/tests/radclient/coa/server_coa_reply.txt b/src/tests/radclient/coa/server_coa_reply.txt
new file mode 100644 (file)
index 0000000..b4ca1e1
--- /dev/null
@@ -0,0 +1 @@
+Packet-Type == CoA-ACK