Accessing %{client:...} in C custom module
Boris Lytochkin
lytboris at yandex-team.ru
Tue Mar 1 18:58:38 CET 2016
Hi.
On 01.03.2016 19:22, A.L.M.Buxey at lboro.ac.uk wrote:
>
>> Could anybody point me to the right spot in sources or show an example?
> Alan has already provided that answer :)
OKay, trying naive
mycp = cf_pair_find(request->client->cs, "group");
results in
(gdb) p *mycp
$2 = {item = {next = 0xa00000038, parent = 0x8034c2330, lineno = 805314604,
filename = 0x800300034 <Error reading address 0x800300034: Bad address>, type = 1919181921}, attr = 0x0,
value = 0xb0000003b <Error reading address 0xb0000003b: Bad address>, op = 172, lhs_type = T_INVALID, rhs_type = 73, pass2 = 19, parsed = false}
For a client defined as
client TEST {
ipv4addr = ...
secret = ...
nastype = cisco
group = "8021X"
}
Am I missing some tiny bits to make it work as expected?
There are no references for these techniques in http://wiki.freeradius.org/contributing/Modules3
sorry for asking dumb questions. :)
--
Boris Lytochkin
Yandex NOC
+7 (495) 739 70 00 ext. 7671
More information about the Freeradius-Devel
mailing list