[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gnu-radius] Passing Huntgroup-Name to filter
From: |
Sergey Poznyakoff |
Subject: |
Re: [Help-gnu-radius] Passing Huntgroup-Name to filter |
Date: |
Fri, 28 Nov 2003 09:18:14 +0200 |
Hi Pierre,
> I am trying to pass the value of the attribute Huntgroup-Name to an
> external filtering program.
Oh... Actually, Huntgroup-Name is not a "real" attribute, it is just
a way to invoke scanning hungroups file from a raddb/users entry. It
cannot be referenced to by the usual "%C{}" notation simply because
it never exists in the request. (I admit that this is not very consistent
and needs revising in the future).
Here is a possible way to solve the problem:
1) To your raddb/rewrite, add the following function:
integer
add_local()
{
%[Huntgroup-Name] = "local";
return 0;
}
2) Change the huntgroups entry as follows:
local NAS-IP-Address = 127.0.0.1 Rewrite-Function = "add_local"
Now your filter should receive Huntgroup-Name attribute. If you have
several huntgroups entries, each one should use its own function, e.g.:
local NAS-IP-Address = 127.0.0.1 Rewrite-Function = "add_local"
remote NAS-IP-Address = 10.10.1.1 Rewrite-Function = "add_remote"
...
Regards,
Sergey