Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

varchar(50) for connectinfo_start in radacct may be too short #3977

Closed
yangzhaofeng opened this issue Mar 11, 2021 · 1 comment
Closed

varchar(50) for connectinfo_start in radacct may be too short #3977

yangzhaofeng opened this issue Mar 11, 2021 · 1 comment

Comments

@yangzhaofeng
Copy link

Issue type


  • Defect - Unexpected behaviour (obvious or verified by project member).

connectinfo_start varchar(50) default NULL,

50 may be too short for the increasing length of VPN client "user agents"

Defect

How to reproduce the issue

Connect to OpenConnect server with a client of a long "user agent" (like network-manager-openconnect(-gnome) with openconnect 8.10-2 on Debian bullseye, the "user agent" is OpenConnect VPN Agent =28NetworkManager=29 v8.10-2=2Bb1, longer than 50 chars).

To workaround: temporarily disable strict mode for mysql. The "user agent" will be truncated.

Output of [radiusd|freeradius] -X showing issue occurring

(1) sql:    --> INSERT INTO radacct (acctsessionid,		acctuniqueid,		username, realm,		nasipaddress,		nasportid, nasporttype,		acctstarttime,		acctupdatetime, acctstoptime,		acctsessiontime, 	acctauthentic, connectinfo_start,	connectinfo_stop, 	acctinputoctets, acctoutputoctets,	calledstationid, 	callingstationid, acctterminatecause,	servicetype,		framedprotocol, framedipaddress) VALUES ('YuUSumym/Ulmo8zK54cmYpBIhzc=3D', 'e642f677fcd8f3a2f6737ad49840f384', 'Steven', '', '<hidden>', '', '', FROM_UNIXTIME(1615446300), FROM_UNIXTIME(1615446300), NULL, '0', 'RADIUS', 'OpenConnect VPN Agent =28NetworkManager=29 v8.10-2=2Bb1', '', '0', '0', '', '<hidden>', '', 'Framed-User', 'PPP', '')
(1) sql: Executing query: INSERT INTO radacct (acctsessionid,		acctuniqueid,		username, realm,	nasipaddress,		nasportid, nasporttype,		acctstarttime,		acctupdatetime, acctstoptime,		acctsessiontime, 	acctauthentic, connectinfo_start,	connectinfo_stop, 	acctinputoctets, acctoutputoctets,	calledstationid, 	callingstationid, acctterminatecause,	servicetype,		framedprotocol, framedipaddress) VALUES ('YuUSumym/Ulmo8zK54cmYpBIhzc=3D', 'e642f677fcd8f3a2f6737ad49840f384', 'Steven', '', '<hidden>', '', '', FROM_UNIXTIME(1615446300), FROM_UNIXTIME(1615446300), NULL, '0', 'RADIUS', 'OpenConnect VPN Agent =28NetworkManager=29 v8.10-2=2Bb1', '', '0', '0', '', '<hidden>', '', 'Framed-User', 'PPP', '')
(1) sql: ERROR: rlm_sql_mysql: ERROR 1406 (Data too long for column 'connectinfo_start' at row 1): 22001
(1) sql: SQL query returned: server error
rlm_sql (sql): Released connection (4)
(1)     [sql] = fail
(1)   } # accounting = fail
(1) Not sending reply to client.
(1) Finished request
(1) Cleaning up request packet ID 168 with timestamp +8
mcnewton added a commit that referenced this issue May 12, 2021
@mcnewton
Copy link
Member

Bumped up, should keep it going for a while longer. But people can always increase it locally if needed.

fdurand pushed a commit to fdurand/freeradius-server that referenced this issue Mar 25, 2022
nathandarnell added a commit to nathandarnell/gsuiteRadius that referenced this issue Apr 23, 2022
Ran into an issue with the field length for connectinfo_start and connectinfo_stop being too small similar to this issue: FreeRADIUS/freeradius-server#3977

Increased it to 128 to keep it in line with the 3.0 and 3.2 branches: FreeRADIUS/freeradius-server@17c60ec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants