]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
ippool: Fix missing 'Called-Station-Id' in the MySQL/procedure.sql (#4185)
authorJorge Pereira <jpereira@users.noreply.github.com>
Sun, 15 Aug 2021 13:20:51 +0000 (10:20 -0300)
committerGitHub <noreply@github.com>
Sun, 15 Aug 2021 13:20:51 +0000 (09:20 -0400)
As the scheme.sql has the 'calledstationid' field, we should fill it up.

raddb/mods-config/sql/ippool/mysql/procedure.sql
raddb/mods-config/sql/ippool/mysql/queries.conf

index 121451fb6a1dca7724e8149a4b8c01677ba9f26a..2a525666e9a2350e9f1cff231553f5cd0a910fde 100644 (file)
@@ -21,6 +21,7 @@
 --             '%{control:${pool_name}}', \
 --             '%{User-Name}', \
 --             '%{Calling-Station-Id}', \
+--             '%{Called-Station-Id}', \
 --             '%{NAS-IP-Address}', \
 --             '${pool_key}', \
 --             ${lease_duration} \
@@ -38,6 +39,7 @@ CREATE PROCEDURE fr_allocate_previous_or_new_framedipaddress (
         IN v_pool_name VARCHAR(64),
         IN v_username VARCHAR(64),
         IN v_callingstationid VARCHAR(64),
+        IN v_calledstationid VARCHAR(64),
         IN v_nasipaddress VARCHAR(15),
         IN v_pool_key VARCHAR(64),
         IN v_lease_duration INT
@@ -122,6 +124,7 @@ proc:BEGIN
                 nasipaddress = v_nasipaddress,
                 pool_key = v_pool_key,
                 callingstationid = v_callingstationid,
+                calledstationid = v_calledstationid,
                 username = v_username,
                 expiry_time = NOW() + INTERVAL v_lease_duration SECOND
         WHERE framedipaddress = r_address;
index eda9793a381e38dd061d2180988620fffcff44d7..c4210204b16925bc623482ac5d1e7bbcdaf5b029 100644 (file)
@@ -88,6 +88,7 @@ allocate_update = "\
 #              '%{control:${pool_name}}', \
 #              '%{User-Name}', \
 #              '%{Calling-Station-Id}', \
+#              '%{Called-Station-Id}', \
 #              '%{NAS-IP-Address}', \
 #              '${pool_key}', \
 #              ${lease_duration} \