From: Alan T. DeKok Date: Thu, 6 Mar 2025 20:14:13 +0000 (-0500) Subject: remove '&' from redis_ippool X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6238f60fdf89cb0021a558946902ae23f838dfd;p=thirdparty%2Ffreeradius-server.git remove '&' from redis_ippool --- diff --git a/doc/antora/modules/reference/pages/raddb/mods-available/redis_ippool.adoc b/doc/antora/modules/reference/pages/raddb/mods-available/redis_ippool.adoc index 19d51d106d..8923d6e993 100644 --- a/doc/antora/modules/reference/pages/raddb/mods-available/redis_ippool.adoc +++ b/doc/antora/modules/reference/pages/raddb/mods-available/redis_ippool.adoc @@ -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 diff --git a/raddb/mods-available/redis_ippool b/raddb/mods-available/redis_ippool index bbb1e9251c..9483256ffe 100644 --- a/raddb/mods-available/redis_ippool +++ b/raddb/mods-available/redis_ippool @@ -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 diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c index 1d9a0999bd..1a0f89663b 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c @@ -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 } };