]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove '&' from redis_ippool
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 20:14:13 +0000 (15:14 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 21:12:50 +0000 (16:12 -0500)
doc/antora/modules/reference/pages/raddb/mods-available/redis_ippool.adoc
raddb/mods-available/redis_ippool
src/modules/rlm_redis_ippool/rlm_redis_ippool.c

index 19d51d106d860548435badd7aac8198e96cd2bb4..8923d6e99343cfccd06772309f8159ee19acd8ef 100644 (file)
@@ -138,20 +138,20 @@ NOTE: See the `redis` module for more information.
 
 ```
 redis_ippool {
-       pool_name = &control.IP-Pool.Name
+       pool_name = control.IP-Pool.Name
        offer_time = 30
        lease_time = 3600
 #      wait_num = 10
 #      wait_timeout = 2
-#      gateway = &NAS-Identifier
-       owner = &Client-Hardware-Address
-#      owner = "%{&Client-Identifier || &Client-Hardware-Address}"
+#      gateway = NAS-Identifier
+       owner = Client-Hardware-Address
+#      owner = "%{Client-Identifier || Client-Hardware-Address}"
 #      owner = "%{Vendor-Specific.ADSL-Forum.Agent-Circuit-ID} %{Calling-Station-Id}"
-       requested_address = "%{&Requested-IP-Address || &Net.Src.IP}"
+       requested_address = "%{Requested-IP-Address || Net.Src.IP}"
 #      ipv4_integer = yes
-       allocated_address_attr = &reply.Your-IP-Address
-       range_attr = &reply.IP-Pool.Range
-       expiry_attr = &reply.IP-Address-Lease-Time
+       allocated_address_attr = reply.Your-IP-Address
+       range_attr = reply.IP-Pool.Range
+       expiry_attr = reply.IP-Address-Lease-Time
        copy_on_update = yes
        redis {
                server = localhost
index bbb1e9251cd47ea539005d6b23c8189019efdf94..9483256ffe8eb239734466363a0335435cbb73f6 100644 (file)
@@ -31,7 +31,7 @@ redis_ippool {
        #
        #  pool_name:: Name of the pool from which leases are allocated.
        #
-       pool_name = &control.IP-Pool.Name
+       pool_name = control.IP-Pool.Name
 
        #
        #  offer_time:: How long a lease is reserved for after making an offer.
@@ -63,7 +63,7 @@ redis_ippool {
        #  gateway:: Gateway identifier, usually `NAS-Identifier` or the actual Option 82 gateway.
        #  Used for bulk lease cleanups.
        #
-#      gateway = &NAS-Identifier
+#      gateway = NAS-Identifier
 
        #
        #  owner:: The unique owner identifier to which an IP is assigned.
@@ -74,7 +74,7 @@ redis_ippool {
        #
        #  For DHCP it is often simply the MAC address of the owner.
        #
-       owner = &Client-Hardware-Address
+       owner = Client-Hardware-Address
 
        #
        #  RFC 2132 specifies that the DHCP client may supply a unique
@@ -83,7 +83,7 @@ redis_ippool {
        #  Otherwise the client hardware address must be used. To comply with
        #  this requirement use the following:
        #
-#      owner = "%{&Client-Identifier || &Client-Hardware-Address}"
+#      owner = "%{Client-Identifier || Client-Hardware-Address}"
 
        #
        #  For purposes such as IP assignment using a RADIUS Framed-IP-Address
@@ -102,7 +102,7 @@ redis_ippool {
        #
        #  requested_address:: The IP address being renewed or released.
        #
-       requested_address = "%{&Requested-IP-Address || &Net.Src.IP}"
+       requested_address = "%{Requested-IP-Address || Net.Src.IP}"
 
        #
        #  ipv4_integer:: Whether IPv4 addresses should be cast to integers, for renew operations.
@@ -113,7 +113,7 @@ redis_ippool {
        #
        #  allocated_address_attr:: List and attribute where the allocated address is written to.
        #
-       allocated_address_attr = &reply.Your-IP-Address
+       allocated_address_attr = reply.Your-IP-Address
 
        #
        #  range_attr:: List and attribute where the `IP-Pool.Range` ID (if set) is written to.
@@ -125,7 +125,7 @@ redis_ippool {
        #  There may be multiple ranges of IP address contained within any given pool,
        #  which is why this is provided in addition to the pool name.
        #
-       range_attr = &reply.IP-Pool.Range
+       range_attr = reply.IP-Pool.Range
 
        #
        #  expiry_attr:: If set - the list and attribute to write the remaining lease time to.
@@ -133,7 +133,7 @@ redis_ippool {
        #  This attribute can be populated on alloc, or renew, if an
        #  IP address was available for the alloc.
        #
-       expiry_attr = &reply.IP-Address-Lease-Time
+       expiry_attr = reply.IP-Address-Lease-Time
 
        #
        #  copy_on_update:: If true - Copy the value of ip_address to the attribute specified by
index 1d9a0999bd06e5d3d552a9749fd76a7a31695739..1a0f89663b8fa6cd5fa3b658b757b1dd7aa6916f 100644 (file)
@@ -211,10 +211,10 @@ static const call_env_method_t redis_ippool_update_method_env = {
                                     .pair.dflt = "", .pair.dflt_quote = T_SINGLE_QUOTED_STRING },
                { FR_CALL_ENV_OFFSET("lease_time", FR_TYPE_UINT32, CALL_ENV_FLAG_REQUIRED,  redis_ippool_update_call_env_t, lease_time) },
                { FR_CALL_ENV_OFFSET("requested_address", FR_TYPE_COMBO_IP_ADDR, CALL_ENV_FLAG_REQUIRED | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, redis_ippool_update_call_env_t, requested_address),
-                                    .pair.dflt = "%{%{Requested-IP-Address} || %{Net.Src.IP}}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING },
+                                    .pair.dflt = "%{Requested-IP-Address || Net.Src.IP}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("allocated_address_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE | CALL_ENV_FLAG_REQUIRED, redis_ippool_update_call_env_t, allocated_address_attr) },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("range_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE | CALL_ENV_FLAG_REQUIRED, redis_ippool_update_call_env_t, range_attr),
-                                              .pair.dflt = "&reply.IP-Pool.Range", .pair.dflt_quote = T_BARE_WORD },
+                                              .pair.dflt = "reply.IP-Pool.Range", .pair.dflt_quote = T_BARE_WORD },
                { FR_CALL_ENV_PARSE_ONLY_OFFSET("expiry_attr", FR_TYPE_VOID, CALL_ENV_FLAG_ATTRIBUTE, redis_ippool_update_call_env_t, expiry_attr) },
                CALL_ENV_TERMINATOR
        }
@@ -228,7 +228,7 @@ static const call_env_method_t redis_ippool_release_method_env = {
                { FR_CALL_ENV_OFFSET("gateway", FR_TYPE_STRING, CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_CONCAT | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, redis_ippool_release_call_env_t, gateway_id),
                                     .pair.dflt = "", .pair.dflt_quote = T_SINGLE_QUOTED_STRING },
                { FR_CALL_ENV_OFFSET("requested_address", FR_TYPE_COMBO_IP_ADDR, CALL_ENV_FLAG_REQUIRED | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, redis_ippool_release_call_env_t, requested_address),
-                                    .pair.dflt = "%{%{Requested-IP-Address} || %{Net.Src.IP}}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING },
+                                    .pair.dflt = "%{Requested-IP-Address || Net.Src.IP}", .pair.dflt_quote = T_DOUBLE_QUOTED_STRING },
                CALL_ENV_TERMINATOR
        }
 };