From: Alan T. DeKok Date: Thu, 6 Mar 2025 14:30:40 +0000 (-0500) Subject: remove '&' from sqlippool configuration and source X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ec7445729d199e4a895dd53383a156cca358f9f;p=thirdparty%2Ffreeradius-server.git remove '&' from sqlippool configuration and source --- diff --git a/doc/antora/modules/reference/pages/raddb/mods-available/sqlippool.adoc b/doc/antora/modules/reference/pages/raddb/mods-available/sqlippool.adoc index d0666b9990..e3cba45c99 100644 --- a/doc/antora/modules/reference/pages/raddb/mods-available/sqlippool.adoc +++ b/doc/antora/modules/reference/pages/raddb/mods-available/sqlippool.adoc @@ -77,7 +77,7 @@ For DHCPv4 the owner will likely be specified by: * `%{Client-Hardware-Address}` which binds the lease to the mac address of the user's device. - * `%{&Client-Identifier || &Client-Hardware-Address}` + * `%{Client-Identifier || Client-Hardware-Address}` which binds the lease to either the custom identifier set by the DHCP client, or if this is absent, the mac address of the user's device. @@ -109,7 +109,7 @@ requested_address:: The IP address being renewed or released. For RADIUS the requested_address will almost always be `%{Framed-IP-Address}`. For DHCPv4 the requested_address will almost always be -`%{&Requested-IP-Address || &Client-IP-Address}`. +`%{Requested-IP-Address || Client-IP-Address}`. @@ -141,13 +141,13 @@ sqlippool { ippool_table = "fr_ippool" lease_duration = 3600 offer_duration = 60 - pool_name = &control.IP-Pool.Name - allocated_address_attr = &reply.Framed-IP-Address + pool_name = control.IP-Pool.Name + allocated_address_attr = reply.Framed-IP-Address owner = "%{Calling-Station-ID}" -# owner = "%{&Client-Identifier || &Client-Hardware-Address}" +# owner = "%{Client-Identifier || Client-Hardware-Address}" requested_address = "%{Framed-IP-Address}" -# requested_address = "%{&Requested-IP-Address || &Client-IP-Address}" - gateway = "%{&NAS-Identifier || &NAS-IP-Address}" +# requested_address = "%{Requested-IP-Address || Client-IP-Address}" + gateway = "%{NAS-Identifier || NAS-IP-Address}" $INCLUDE ${modconfdir}/sql/ippool/${dialect}/queries.conf } ``` diff --git a/raddb/mods-available/sqlippool b/raddb/mods-available/sqlippool index 18b8819780..4ba8d056c6 100644 --- a/raddb/mods-available/sqlippool +++ b/raddb/mods-available/sqlippool @@ -47,7 +47,7 @@ sqlippool { # # pool_name: The attribute which contains the pool name. # - pool_name = &control.IP-Pool.Name + pool_name = control.IP-Pool.Name # # allocated_address_attr:: List and attribute where the allocated address is written to. @@ -58,7 +58,7 @@ sqlippool { # # e.g. `ipaddr`, `ipv4prefix,` `ipv6addr`, or `ipv6prefix`. # ==== - allocated_address_attr = &reply.Framed-IP-Address + allocated_address_attr = reply.Framed-IP-Address # # owner:: Expansion which identifies the owner of the lease. @@ -88,7 +88,7 @@ sqlippool { # * `%{Client-Hardware-Address}` which binds the lease to the # mac address of the user's device. # - # * `%{&Client-Identifier || &Client-Hardware-Address}` + # * `%{Client-Identifier || Client-Hardware-Address}` # which binds the lease to either the custom identifier set by the # DHCP client, or if this is absent, the mac address of the user's # device. @@ -114,7 +114,7 @@ sqlippool { # owner = "%{Vendor-Specific.ADSL-Forum.Agent-Circuit-ID}.%{Calling-Station-Id}" -# owner = "%{&Client-Identifier || &Client-Hardware-Address}" +# owner = "%{Client-Identifier || Client-Hardware-Address}" # # requested_address:: The IP address being renewed or released. @@ -122,11 +122,11 @@ sqlippool { # For RADIUS the requested_address will almost always be `%{Framed-IP-Address}`. # # For DHCPv4 the requested_address will almost always be - # `%{&Requested-IP-Address || &Client-IP-Address}`. + # `%{Requested-IP-Address || Client-IP-Address}`. # requested_address = "%{Framed-IP-Address}" -# requested_address = "%{&Requested-IP-Address || &Client-IP-Address}" +# requested_address = "%{Requested-IP-Address || Client-IP-Address}" # # gateway:: The device controlling access to the network or relaying @@ -140,7 +140,7 @@ sqlippool { # For DHCPv4, this device is recorded so that we can respond correctly # to lease queries. # - gateway = "%{&NAS-Identifier || &NAS-IP-Address}" + gateway = "%{NAS-Identifier || NAS-IP-Address}" # gateway = "%{Gateway-IP-Address}" diff --git a/src/modules/rlm_sqlippool/rlm_sqlippool.c b/src/modules/rlm_sqlippool/rlm_sqlippool.c index b094dd77f0..d7852cb664 100644 --- a/src/modules/rlm_sqlippool/rlm_sqlippool.c +++ b/src/modules/rlm_sqlippool/rlm_sqlippool.c @@ -694,9 +694,9 @@ static int call_env_parse(TALLOC_CTX *ctx, void *out, tmpl_rules_t const *t_rule static const call_env_method_t sqlippool_alloc_method_env = { FR_CALL_ENV_METHOD_OUT(ippool_alloc_call_env_t), .env = (call_env_parser_t[]) { - { FR_CALL_ENV_PARSE_OFFSET("pool_name", FR_TYPE_STRING, CALL_ENV_FLAG_REQUIRED | CALL_ENV_FLAG_CONCAT | CALL_ENV_FLAG_NULLABLE, + { FR_CALL_ENV_PARSE_OFFSET("pool_name", FR_TYPE_STRING, CALL_ENV_FLAG_REQUIRED | CALL_ENV_FLAG_CONCAT | CALL_ENV_FLAG_NULLABLE | CALL_ENV_FLAG_BARE_WORD_ATTRIBUTE, ippool_alloc_call_env_t, pool_name, pool_name_tmpl), - .pair.dflt = "&control.IP-Pool.Name", .pair.dflt_quote = T_BARE_WORD }, + .pair.dflt = "control.IP-Pool.Name", .pair.dflt_quote = T_BARE_WORD }, { FR_CALL_ENV_OFFSET("requested_address", FR_TYPE_VOID, CALL_ENV_FLAG_NULLABLE, ippool_alloc_call_env_t, requested_address) }, { FR_CALL_ENV_PARSE_OFFSET("allocated_address_attr", FR_TYPE_VOID,