]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove '&' from sqlippool configuration and source
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 14:30:40 +0000 (09:30 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Mar 2025 16:39:08 +0000 (11:39 -0500)
doc/antora/modules/reference/pages/raddb/mods-available/sqlippool.adoc
raddb/mods-available/sqlippool
src/modules/rlm_sqlippool/rlm_sqlippool.c

index d0666b99905f778829fe0534e30a5d6651a3a670..e3cba45c9948f9a8fac64ae99fdd22c807d93bbb 100644 (file)
@@ -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
 }
 ```
index 18b88197803df73c991ab1d9914d3c14492dcf3e..4ba8d056c6d782db955484cf512c1f63cf1aaab2 100644 (file)
@@ -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}"
 
index b094dd77f0577a1274cf5bfd8a0640b71227479a..d7852cb6640a59d51a27c8134489d8798aa2c8f1 100644 (file)
@@ -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,