]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
pool_name is needed by the queries.
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 14:08:29 +0000 (10:08 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Sep 2021 14:14:47 +0000 (10:14 -0400)
and use ${pool_name} consistently everywhere.

Apparently we don't even use this module during the tests :(

raddb/mods-available/sqlippool
raddb/mods-config/sql/ippool/mysql/queries.conf
raddb/mods-config/sql/ippool/oracle/queries.conf
raddb/mods-config/sql/ippool/sqlite/queries.conf

index 74d6899864c94e9c07047b686e71378bb9464de1..2bf4781acb330044bf300e0befe11b7819056ae5 100644 (file)
@@ -39,6 +39,11 @@ sqlippool {
        #
        lease_duration = 3600
 
+       #
+       #  pool_name: The attribute in the `control` list which contains the pool name.
+       #
+       pool_name = IP-Pool.Name
+
        #
        #  allocated_address_attr:: List and attribute where the allocated address is written to.
        #
index 189cff33b2e781f6e6ceca5120c7f134a63e9f3c..15fec59aa4eda48434cb947aad6120161cf4cd86 100644 (file)
@@ -108,7 +108,7 @@ alloc_find = "\
 pool_check = "\
        SELECT id \
        FROM ${ippool_table} \
-       WHERE pool_name='%{control.${IP-Pool.Name}}' \
+       WHERE pool_name='%{control.${pool_name}}' \
        LIMIT 1"
 
 #
index 996d366a3913eb1e4f78266ae6a5ac04238fbf92..7c5cc4d7aac17cfaedc4fe4a5945fcea7cf38bff 100644 (file)
@@ -95,7 +95,7 @@ pool_check = "\
        FROM (\
                SELECT id \
                FROM ${ippool_table} \
-               WHERE pool_name = '%{control.IP-Pool.Name}'\
+               WHERE pool_name = '%{control.${pool_name}}'\
        ) WHERE ROWNUM = 1"
 
 #
index 0fbe61e0624b6c9afd60ac405c5ff416353ba1a1..0608cd1c62c830a985a27675f9ffc718bc64c3c9 100644 (file)
@@ -91,7 +91,7 @@ alloc_find = "\
 pool_check = "\
        SELECT id \
        FROM ${ippool_table} \
-       WHERE pool_name='%{control.IP-Pool.Name}' \
+       WHERE pool_name='%{control.${pool_name}}' \
        LIMIT 1"
 
 #