any reason why the session_id is limited to only 8 bytes in radutmp? It's truncating my session_ids by 2 bytes and caused me a lot of headaches :P Would it break anything if I'd just increase it to 32 bytes? While we're at it, why not change the login to 64 bytes as well? I can implement it and submit a patch...just thought I'd email the list first to make sure I'm not doing anything stupid. include/radutmp.h struct radutmp { char login[32]; /* Loginname */ /* FIXME: extend to 48 or 64 bytes */ unsigned int nas_port; /* Port on the terminal server (32 bits). */ char session_id[8]; /* Radius session ID (first 8 bytes at least)*/ /* FIXME: extend to 16 or 32 bytes */ -Gabe
Gabriel Blanchard wrote:
any reason why the session_id is limited to only 8 bytes in radutmp?
Compatibility with the traditional "utmp" files.
It's truncating my session_ids by 2 bytes and caused me a lot of headaches :P
Would it break anything if I'd just increase it to 32 bytes?
Yes. "radlast" is a shell script wrapper around "last".
While we're at it, why not change the login to 64 bytes as well?
Or, just store the data in a database.
I can implement it and submit a patch...just thought I'd email the list first to make sure I'm not doing anything stupid.
I'd prefer to get rid of old files. Databases are simple to use, and should be preferred over files that grow forever. Alan DeKok.
On 2010-12-09, at 6:08 AM, Alan DeKok wrote:
I can implement it and submit a patch...just thought I'd email the list first to make sure I'm not doing anything stupid.
I'd prefer to get rid of old files. Databases are simple to use, and should be preferred over files that grow forever.
Well, I just implemented that, I soon found out that radwho gets unbelievably slow since it never deletes any historical data. The module makes use of the rlm_sql module so any database is supported. It's pretty much a copy of the rlm_sqlippool code with modifications. I've only tested it with mysql and appears to be stable so far and running in production...I'll send a patch a little later. -Gabe
participants (2)
-
Alan DeKok -
Gabriel Blanchard