[Devel] acc diff
Juha Heinanen
jh at tutpro.com
Tue Oct 3 15:09:25 CEST 2006
Dan Pascu writes:
> Currently it is taken from the credentials username or if that is not
> present from the From field's username. So what is the value (pseudo
> variable) we can attach to an extra User-Name attribute we send to radius
> accounting to get the old behavior without resorting to contorted tests
> and avp manipulations in the script?
something like this:
define(`USERNAME', i:102)
define(`AUTHENTICATED', 10)
modparam("acc", "radius_extra", "User-Name=$avp(USERNAME)")
...
set AUTHENTICATED flag after successful authentication
...
if (isflagset(AUTHENTICATED)) {
avp_printf($avp(USERNAME), "$au@$ar");
} else {
avp_write("$fu", $avp(USERNAME));
}
-- juha
More information about the Devel
mailing list