From: Jorge Pereira Date: Sun, 15 Aug 2021 13:20:51 +0000 (-0300) Subject: ippool: Fix missing 'Called-Station-Id' in the MySQL/procedure.sql (#4185) X-Git-Tag: release_3_0_24~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b618974177854d74317fd05c1c54b382ab017ecd;p=thirdparty%2Ffreeradius-server.git ippool: Fix missing 'Called-Station-Id' in the MySQL/procedure.sql (#4185) As the scheme.sql has the 'calledstationid' field, we should fill it up. --- diff --git a/raddb/mods-config/sql/ippool/mysql/procedure.sql b/raddb/mods-config/sql/ippool/mysql/procedure.sql index 121451fb6a..2a525666e9 100644 --- a/raddb/mods-config/sql/ippool/mysql/procedure.sql +++ b/raddb/mods-config/sql/ippool/mysql/procedure.sql @@ -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; diff --git a/raddb/mods-config/sql/ippool/mysql/queries.conf b/raddb/mods-config/sql/ippool/mysql/queries.conf index eda9793a38..c4210204b1 100644 --- a/raddb/mods-config/sql/ippool/mysql/queries.conf +++ b/raddb/mods-config/sql/ippool/mysql/queries.conf @@ -88,6 +88,7 @@ allocate_update = "\ # '%{control:${pool_name}}', \ # '%{User-Name}', \ # '%{Calling-Station-Id}', \ +# '%{Called-Station-Id}', \ # '%{NAS-IP-Address}', \ # '${pool_key}', \ # ${lease_duration} \