]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove use of %I expansion from sqlippool queries
authorNick Porter <nick@portercomputing.co.uk>
Thu, 18 Jan 2024 17:38:51 +0000 (17:38 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 18 Jan 2024 18:12:55 +0000 (18:12 +0000)
raddb/mods-config/sql/ippool/mssql/queries.conf
raddb/mods-config/sql/ippool/mysql/queries.conf
raddb/mods-config/sql/ippool/oracle/queries.conf
raddb/mods-config/sql/ippool/postgresql/queries.conf
raddb/mods-config/sql/ippool/sqlite/queries.conf

index 431f331b73845ffbc3948ec046daf736e0f1d4ea..0a8cd64742ed22cf83df4fcee2d8d24fee00239c 100644 (file)
@@ -156,7 +156,7 @@ pool_check = "\
 #      SET \
 #              gateway = '${gateway}', owner = '${owner}', \
 #              expiry_time = DATEADD(SECOND,${offer_duration},CURRENT_TIMESTAMP) \
-#      WHERE address = '%I'"
+#      WHERE address = '%{reply.${allocated_address_attr}}'"
 
 #
 #  Use a stored procedure to find AND allocate the address. Read and customise
index 9699290796c2f1262c55853b5b40deb23d5efb57..dbed130d3e1b973e951ab5d04bd8f5786fda0ff3 100644 (file)
@@ -119,7 +119,7 @@ alloc_update = "\
        SET \
                gateway = '${gateway}', owner = '${owner}', \
                expiry_time = NOW() + INTERVAL ${offer_duration} SECOND \
-       WHERE address = '%I'"
+       WHERE address = '%{reply.${allocated_address_attr}}'"
 
 #
 #  Use a stored procedure to find AND allocate the address. Read and customise
index e118077d48fc31794c3f686995ca9dae62ddf19b..c4b2e91999261be4d28de7bc52bfd10a3a98f5de 100644 (file)
@@ -108,7 +108,7 @@ pool_check = "\
 #              gateway = '${gateway}', \
 #              owner = '${owner}', \
 #              expiry_time = current_timestamp + INTERVAL '${offer_duration}' second(1) \
-#      WHERE address = '%I'"
+#      WHERE address = '%{reply.${allocated_address_attr}}'"
 
 
 #
index a5ba7193adadbaaea07a826d7d1be63578564312..19f4da6f3f66f2104a6495b929a1cdfd20e884ef 100644 (file)
@@ -112,7 +112,7 @@ alloc_find = "\
 #              gateway = '${gateway}', \
 #              owner = '${owner}', \
 #              expiry_time = 'now'::timestamp(0) + '${offer_duration} second'::interval \
-#      WHERE address = '%I'"
+#      WHERE address = '%{reply.${allocated_address_attr}}'"
 
 #
 #  If the SELECT and UPDATE are in separate queries then set the following
index 7f8337a22cd2a60f8d2af86e85295686a2ae7170..cb4bb1c6262e127f76f87d9a69e1742ea2331996 100644 (file)
@@ -104,7 +104,7 @@ alloc_update = "\
                gateway = '${gateway}', \
                owner = '${owner}', \
                expiry_time = datetime(strftime('%%s', 'now') + ${offer_duration}, 'unixepoch') \
-       WHERE address = '%I'"
+       WHERE address = '%{reply.${allocated_address_attr}}'"
 
 
 #