Freeradius 3.0.19 causes 'acctterminatecause' cannot be null

Volodymyr Litovka doka.ua at gmx.com
Tue Oct 13 08:51:51 CEST 2020


Hi,

On Mar 18, 2020; 1:04am Alan wrote:

> > I'm using Freeradius 3.0.19 on Ubuntu 19.10.
> > The default schema in
> > /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql doesn't
> seem to
> > work.  I get the following error message, when connecting with my NAS.
> >
> > (3) sql: ERROR: rlm_sql_mysql: ERROR 1048 (Column 'acctterminatecause'
> > cannot be null): 23000
> >
> > I have attached the detailed log.
>
>   The queries added in 3.0.18 had NULL for the 'acctterminatecause'
> field.  That should just be ''.
>
>   I've pushed a fix to GitHub.
>
>   Alan DEKok.

Please, be aware, that queries.conf still contains an error (at least on
Ubuntu 20.04, freeradius 3.0.20+dfsg-3build1), which appears when adding
sql_session_start in post_auth section -
queries.conf/accounting/type/post-auth explicitly inserts NULL for
'acctterminatecause' column.

The patch below fixes this (only for MySQL), but I guess same can be
done for other dialects:

--- mods-config/sql/main/mysql/queries.conf.orig 2020-10-13
08:49:35.841485192 +0300 +++ mods-config/sql/main/mysql/queries.conf
2020-10-13 08:49:58.877127891 +0300 @@ -273,7 +273,7 @@ 0, \
'%{Called-Station-Id}', \ '%{Calling-Station-Id}', \ - NULL, \ + '', \
'%{Service-Type}', \ NULL, \ '', \

Thank you.

--
Volodymyr Litovka
   "Vision without Execution is Hallucination." -- Thomas Edison



More information about the Freeradius-Users mailing list