]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rename "proto = detail" to "handler = detail"
authorAlan T. DeKok <aland@freeradius.org>
Wed, 30 Apr 2025 19:05:41 +0000 (15:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 30 Apr 2025 19:05:41 +0000 (15:05 -0400)
"proto" is still accepted for compatibility.

However, it was too generic / conflicting, and was therefore
confusing.

Similarly, there were comments saying "listen load" would use
name2 to open the "load" module.  But name2 is now used for
something else, and the code was deleted a long time ago.

doc/antora/modules/reference/pages/raddb/sites-available/detail.adoc
doc/antora/modules/reference/pages/raddb/sites-available/load.adoc
raddb/sites-available/detail
raddb/sites-available/load
src/lib/server/virtual_servers.c

index b8f8aab0b8c515dcea67ead70defba5432a42a7e..9275eea32f880a3405e035a52ae0021af7cea9c0 100644 (file)
@@ -27,19 +27,29 @@ following directory.
 
 ```
 
-The "listen" section MUST have a second name here, which
-says "load the detail file processor, and not the typical
-RADIUS UDP / TCP socket IO.
+This is the detail file listener.
 
 ```
        listen detail {
 ```
 
-Overrides the default transport prefix set by
-namespace and loads the detail reader code.
+A special-case over-ride for detail files.  We are
+in the RADIUS namespace, but we load a special
+"detail" handler, instead of the generic RADIUS udp
+/ tcp transports.
+
+This configuration also enables "transport = file",
+which is not normally allowed for RADIUS.
+
+```
+               handler = detail
+
+```
+
+We read from files
 
 ```
-               proto = detail
+               transport = file
 
 ```
 
index dafc6b6a04b30ea4edf5ce85e969a777f37e0703..b759c3540bed869d3d6a5b1e9f02e150077fc00d 100644 (file)
@@ -12,8 +12,7 @@ server load {
 
 ```
 
-Use `listen load { ... }` in any virtual server to do load
-testing against that server.
+This is the load testing listener.
 
 ```
        listen load {
@@ -23,7 +22,7 @@ The main module is the proto module, even though we're
 operating in the RADIUS namespace.
 
 ```
-               proto = load
+               handler = load
 
 ```
 
index 76f170ee86060d0bbeffad7f5b8dfec95ee13b13..09515c8eae741ad3f59dec84f7c5b42affd889ec 100644 (file)
@@ -23,22 +23,24 @@ server detail {
        directory = ${radacctdir}/detail
 
        #
-       #  The "listen" section MUST have a second name here, which
-       #  says "load the detail file processor, and not the typical
-       #  RADIUS UDP / TCP socket IO.
+       #  This is the detail file listener.
        #
-       listen detail {         
+       listen detail {
                #
-               #  We read from files
+               #  A special-case over-ride for detail files.  We are
+               #  in the RADIUS namespace, but we load a special
+               #  "detail" handler, instead of the generic RADIUS udp
+               #  / tcp transports.
                #
-               transport = file
+               #  This configuration also enables "transport = file",
+               #  which is not normally allowed for RADIUS.
+               #
+               handler = detail
 
                #
-               #  A special-case over-ride for detail files.  We are in the
-               #  RADIUS namespace, but we load a special handler for the detail
-               #  file
+               #  We read from files
                #
-               proto = detail
+               transport = file
 
                #
                #  Types of packets we are reading.
index f55be4dae0c233ae91598377890a78be3fb0061b..9d49cf24782e86458fe0c4f9061e296ef12ddb40 100644 (file)
@@ -13,15 +13,14 @@ server load {
        namespace = radius
 
        #
-       #  Use `listen load { ... }` in any virtual server to do load
-       #  testing against that server.
+       #  This is the load testing listener.
        #
        listen load {
                #
                #  The main module is the proto module, even though we're
                #  operating in the RADIUS namespace.
                #
-               proto = load
+               handler = load
 
                #
                #  This is a valid Packet-Type for the current `namespace`
index 8dace1582981a9b67c42fd7f923f4f59680d3b02..3a991b5d3accd35d155462abf6d3dbb0bd991f97 100644 (file)
@@ -402,12 +402,13 @@ static int listen_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_IT
         *      listen section has one else it comes from the
         *      namespace of the virtual server.
         *
-        *      The following results in proto_radius being loaded:
+        *      The following results in proto_radius and proto_radius_udp being loaded:
         *
         *      server foo {
         *              namespace = radius
         *              listen {
-        *
+        *                      transport = udp
+        *                      ...
         *              }
         *      }
         *
@@ -416,7 +417,7 @@ static int listen_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_IT
         *      server foo {
         *              namespace = radius
         *              listen {
-        *                      proto = load
+        *                      handler = load
         *
         *              }
         *      }
@@ -426,7 +427,8 @@ static int listen_parse(TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_IT
         *      to be included in the server.
         *
         */
-       cp = cf_pair_find(listener_cs, "proto");
+       cp = cf_pair_find(listener_cs, "handler");
+       if (!cp) cp = cf_pair_find(listener_cs, "proto");
        if (cp) {
                protocol = cf_pair_value(cp);
                if (!protocol) {