[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gnu-radius] Different reply attributes based upon an username
From: |
Michael Samanov |
Subject: |
[Help-gnu-radius] Different reply attributes based upon an username |
Date: |
Mon, 24 Nov 2003 18:32:35 +0300 |
Hi!
Is it possible to rewrite some attributes of the input packet so that the
new attributes would be added to the reply?
For example:
NAS packet:
User-Name = "test&callback"
...
Here the rewrite function does something so that radius sees
User-Name = "test"
Orig-User-Name = "test&callback"
Orig-Callback = "callback"
and it replies:
Service-Type = Framed-User
Cisco-AVPair = "lcp:callback-dialstring="
Here's the function itself:
integer
check_callback()
{
integer i;
if ((i = index(%[User-Name], '&')) != -1) {
%[Orig-User-Name] = %[User-Name];
%[Orig-Callback] = substr(%[User-Name], i+1, -1);
%[User-Name] = substr(%[User-Name], 0, i);
}
return 0;
}
but we have no working idea how to explain to radius so that it would send
Cisco-AVPair = "lcp:callback-dialstring=" when and only when username is
like "xxx&callback"
Now we are doing with "hints", "users", "huntgroups" - with or without
Suffix && Strip-User-Name, but the best we could achieve was the attribute
needed in the logs, not in the reply
- [Help-gnu-radius] Different reply attributes based upon an username,
Michael Samanov <=