Problem "expand: %{Acct-Input-Gigawords} ->" always get nothing!

Arran Cudbard-Bell a.cudbardb at freeradius.org
Tue Sep 27 11:26:07 CEST 2011


On 27 Sep 2011, at 11:09, snan4love wrote:

> Hello Arran:
> Here is a stop request at the bottom of that debug information.
> 
> And something more confusing,
> I used the user name "snan4love" log in my system for hundreds time, there
> is only one time, I get the currect response with Acct-Input-Octets and
> Acct-Output-Octets .
> 

Wow, thats impressively broken, the NAS should send the same User-Name value in Stop/Interim-Update and Start packets. Ok so many NAS are broken in a different way in that they don't use unique Acct-Session-ID values (they get reset when the NAS reboots), so FreeRADIUS creates a hash in the Acct-Unique-Session-ID attribute, using other attributes from the request like the User-Name.

If the User-Name changes between stops and starts, even though the Acct-Session-ID matches the SQL module will not update the correct record in your SQL database, because the Acct-Unique-Session-ID value will be different.

There are a few ways to fix this, the easiest is to remove the User-Name attribute from the acct_unique module.

1) Edit

raddb/modules/acct_unique {
	key = ...
}

and remove the User-Name attribute

2) Build the current GIT Master Head, look in policy.conf, there's an alternate way of calculating the Acct-Unique-Session-ID using the class attribute

3) Complain to your vendor and get this to fix your buggy NAS (what is the make and model incidentally?)

My suspicion is that the attributes are being included, but you're just looking at the debug from Start packets which don't contain the relevant attributes, and you're not seeing the values in your database because the SQL module is creating duplicate rows.

-Arran

Arran Cudbard-Bell
a.cudbardb at freeradius.org

Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ !





More information about the Freeradius-Users mailing list