dialup.conf custom attributes failure in freeradius 2.2
Hi, I need some help with inserting custom attributes to MySQL server. It seems that version 2.2 broke it, at least on my server… When I revert back to 2.1 it immediately starts to work with same config files. Below are config files and traces for both versions. Any idea? thanks, brm ---------------------- Relevant part of dialup.conf (modified to include custom attributes): accounting_start_query = " \ INSERT INTO ${acct_table1} \ (acctsessionid, acctuniqueid, username, \ imsi, imei, ms_timezone, \ rat_type, user_location_info, realm, \ nasipaddress, nasportid, \ nasporttype, acctstarttime, acctstoptime, \ acctsessiontime, acctauthentic, connectinfo_start, \ connectinfo_stop, acctinputoctets, acctoutputoctets, \ calledstationid, callingstationid, acctterminatecause, \ servicetype, framedprotocol, framedipaddress, \ acctstartdelay, acctstopdelay) \ VALUES \ ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', \ '%{SQL-User-Name}', \ '%{3GPP-IMSI}', '%{3GGP-IMEISV}', '%{3GPP-MS-TimeZone}', \ '%{3GPP-RAT-type}', '%{3GPP-User-Location-Info}', '%{Realm}', \ '%{NAS-IP-Address}', '%{NAS-Port}', \ '%{NAS-Port-Type}', '%S', NULL, \ '0', '%{Acct-Authentic}', '%{Connect-Info}', \ '', '0', '0', \ '%{Called-Station-Id}', '%{Calling-Station-Id}', '', \ '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', \ '%{%{Acct-Delay-Time}:-0}', '0')" Slightly modified dictionary.3gpp file to include custom attributes: # new attributes ATTRIBUTE 3GGP-IMEISV 20 string ATTRIBUTE 3GPP-RAT-type 21 byte ATTRIBUTE 3GPP-User-Location-Info 22 octets ATTRIBUTE 3GPP-MS-TimeZone 23 integer has_tag # set RAT-TYPE VALUE 3GPP-RAT-Type Reserved 0 VALUE 3GPP-RAT-Type UTRAN 1 VALUE 3GPP-RAT-Type GERAN 2 VALUE 3GPP-RAT-Type WLAN 3 VALUE 3GPP-RAT-Type GAN 4 VALUE 3GPP-RAT-Type HSPA-Evolution 5 VALUE 3GPP-RAT-Type IEEE-802-16e 101 VALUE 3GPP-RAT-Type 3GPP2-eHRPD 102 VALUE 3GPP-RAT-Type 3GPP2-HRPD 103 VALUE 3GPP-RAT-Type 3GPP2-1xRTT 104 VALUE 3GPP-RAT-Type 3GPP-EPS 105 This is the accounting start record from debug mode: rad_recv: Accounting-Request packet from host xxxxxxxx port 54002, id=50, length=375 Acct-Status-Type = Start Event-Timestamp = "Jan 26 2013 18:20:08 CET" Framed-IP-Address = xxxxxxx Called-Station-Id = "xxxxxx" Calling-Station-Id = "xxxxxxx" NAS-IP-Address = xxxxxxx NAS-Identifier = "xxxxxxx" Service-Type = Framed-User NAS-Port-Type = Virtual Acct-Session-Id = "5BB9DD25a7846fd9" 3GPP-IMSI = "xxxxxxx" 3GPP-IMSI-MCC-MNC = "xxxxxxx" 3GPP-NSAPI = "5" 3GGP-IMEISV = "xxxxxxx" 3GPP-RAT-type = UTRAN 3GPP-User-Location-Info = 0x0192f307000a79be 3GPP-Charging-ID = 2810474457 3GPP-PDP-Type = IP 3GPP-Selection-Mode = "0" Error on version 2.2: ... +- entering group accounting {...} [sql] expand: %{Calling-Station-Id} -> xxxxxxxx [sql] sql_set_user escaped user --> 'xxxxxxxxx' [sql] WARNING: Unknown module "3GPP-IMSI" in string expansion "%', '%{3GGP-IMEISV}', '%{3GPP-MS-TimeZone}', '%{3GPP-RAT-type}', '%{3GPP-User-Location-Info}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL, '0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0', '%{Called-Station-Id}', '%{Calling-Station-Id}', '', '%{Service-Type}', '%{Framed-Protocol}', '%{Framed-IP-Address}', '%{%{Acct-Delay-Time}:-0}', '0')" [sql] expand: /var/log/radius/sqltrace.sql -> /var/log/radius/sqltrace.sql rlm_sql (sql): Reserving sql socket id: 24 rlm_sql_mysql: query: INSERT INTO radacct (acctsessionid, acctuniqueid, username, imsi, imei, ms_timezone, rat_type, user_location_info, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay) VALUES ('5BB9DD25a7846393', 'b158b29df3a9d9e4', 'xxxxxxxxx', ' rlm_sql_mysql: MYSQL check_error: 1064 received [sql] Couldn't insert SQL accounting START record - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1 Success on version 2.1: … +- entering group accounting {...} [sql] expand: %{Calling-Station-Id} -> XXXXXXXXXXX [sql] sql_set_user escaped user --> 'XXXXXXXXXXX' [sql] expand: %{Acct-Delay-Time} -> [sql] ... expanding second conditional [sql] expand: INSERT INTO radacct (acctsessionid, acctuniqueid, username, imsi, imei, ms_timezone, rat_type, user_location_info, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay) VALUES ('%{Acct-Session-Id}', '%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{3GPP-IMSI}', '%{3GGP-IMEISV}', '%{3GPP-MS-TimeZone}', '%{3GPP-RAT-type}', '%{3GPP-User-Location-Info}', '%{Realm}', '%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NU [sql] expand: /var/log/radius/sqltrace.sql -> /var/log/radius/sqltrace.sql rlm_sql (sql): Reserving sql socket id: 24 rlm_sql_mysql: query: INSERT INTO radacct (acctsessionid, acctuniqueid, username, imsi, imei, ms_timezone, rat_type, user_location_info, sgsnipaddress, realm, nasipaddress, nasportid, nasporttype, acctstarttime, acctstoptime, acctsessiontime, acctauthentic, connectinfo_start, connectinfo_stop, acctinputoctets, acctoutputoctets, calledstationid, callingstationid, acctterminatecause, servicetype, framedprotocol, framedipaddress, acctstartdelay, acctstopdelay) VALUES ('5BB9DD25a7846fd9', '03de33c93bd3a02b', 'XXXXXXXXXXX', 'XXXXXXXXXXX', 'XXXXXXXXXXX', '0x04fc', 'UTRAN', '0x0192f307000a79be', '', 'XXXXXXXXXXX', '', 'Virtual', '2013-01-26 18:20:06', NULL, '0', '', '', '', '0', '0', 'XXXXXXXXXXX', 'XXXXXXXXXXX', '', 'Framed-User', 'GPRS-PDP-Context', 'XXXXXXXXXXX', '0', '0') rlm_sql (sql): Released sql socket id: 24 ++[sql] returns ok [attr_filter.accounting_response] expand: %{User-Name} -> ++[attr_filter.accounting_response] returns noop Sending Accounting-Response of id 50 to XXXXXXXXXXX port 54002 Finished request 0.
Hi,
Hi, I need some help with inserting custom attributes to MySQL server. It seems that version 2.2 broke it, at least on my server... When I revert back to 2.1 it immediately starts to work with same config files. Below are config files and traces for both versions.
Any idea?
yes, you dont seem to have 3GPP-IMSI in your dictionary file. thus the string expansion fails as per
[sql] WARNING: Unknown module "3GPP-IMSI" in string expansion "%',
thats my first guess anyway! ;-) alan
yes, you dont seem to have 3GPP-IMSI in your dictionary file. thus the string expansion fails
Yes, that was my first thought but I am confident it is there, that's why it is strange… [root@server ~]# grep IMSI /usr/local/share/freeradius/dictionary.3gpp ATTRIBUTE 3GPP-IMSI 1 string ATTRIBUTE 3GPP-IMSI-MCC-MNC 8 string [root@server ~]#
Miha Petkovsek wrote:
Hi, I need some help with inserting custom attributes to MySQL server. It seems that version 2.2 broke it, at least on my server… When I revert back to 2.1 it immediately starts to work with same config files.
Below are config files and traces for both versions.
Any idea?
Use the v2.x.x branch from git. We should release 2.2.1 soon. Alan DeKok.
On Jan 28, 2013, at 4:27 PM, Alan DeKok <aland@deployingradius.com> wrote:
Use the v2.x.x branch from git.
We should release 2.2.1 soon.
Alan DeKok.
Hi Alan, I can wait till 2.2.1 is released, no problem, will wait for freebsd ports being updated with latest version and try again :) I just wanted to know if I am doing something wrong or something changed… Thanks for response!
Any release notes or is it primarily a bug fix release? David On Jan 28, 2013, at 4:27 PM, Alan DeKok <aland@deployingradius.com> wrote: Use the v2.x.x branch from git. We should release 2.2.1 soon. Alan DeKok. Hi Alan, I can wait till 2.2.1 is released, no problem, will wait for freebsd ports being updated with latest version and try again :) I just wanted to know if I am doing something wrong or something changed... Thanks for response!
David Peterson wrote:
Any release notes or is it primarily a bug fix release?
Mostly a bug fix release. https://github.com/FreeRADIUS/freeradius-server/blob/v2.x.x/doc/ChangeLog Alan DeKok.
participants (4)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
David Peterson -
Miha Petkovsek