]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Overview of new Perl attribute list access / manipulation in upgrade doc
authorNick Porter <nick@portercomputing.co.uk>
Mon, 19 May 2025 11:18:58 +0000 (12:18 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 19 May 2025 12:34:13 +0000 (13:34 +0100)
doc/antora/modules/howto/pages/installation/upgrade.adoc

index 65ac39791a45aa156eae69ba553d5e678a39269f..5f9842430d9794d756d2df9be4c001ed17c19986 100644 (file)
@@ -905,6 +905,22 @@ data, instead of as hex strings.
 
 All data received from the network is marked `tainted` by default.
 
+Rather than using the global hashes `%RAD_REQUEST` etc, Perl subroutines
+called by FreeRADIUS during packet processing are passed a hash ref
+representing the packet being processed.
+
+This hash ref contains four hashes representing the attribute lists.
+
+Manipulating the values of attributes is now done directly from the
+Perl subroutines e.g.
+
+```
+$p->{'reply'}{'foo'}[0] = 'baa'
+```
+
+Will set the value of `reply.foo` to `"baa"`, creating the pair if
+needed.
+
 === rlm_python
 
 Rather than passing a tuple representing attributes in the `request`