how to include 'Packet-Src-IP-Address' for map in FreeRadius V.4x

35 Views Asked by At

based on my fail per this case. i tried a workaround by replacing the 'new client' section with

new client {
    # map json "%rest(GET http://example.org/api/user/%{User-Name})"
    map json "%rest(http://192.168.56.1:5000/radius/dclient/%{Packet-Src-IP-Address})"{
        &FreeRADIUS-Client-IP-Address := '$.FreeRADIUS-Client-IP-Address'
        &FreeRADIUS-Client-Shortname := '$.FreeRADIUS-Client-Shortname'
        &FreeRADIUS-Client-Secret := '$.FreeRADIUS-Client-Secret'
    }
    ok
}

but radiusd -X gives me


...
#### Instantiating listeners ####
Compiling policies in server default { ... }
Instantiating proto_radius "default.radius"
Instantiating proto_radius "default.udp_acct"
Instantiating process_radius "default"
Compiling policies in - recv Access-Request {...}
Compiling policies in - send Access-Accept {...}
Compiling policies in - send Access-Challenge {...}
Compiling policies in - send Access-Reject {...}
Compiling policies in - recv Accounting-Request {...}
Compiling policies in - send Accounting-Response {...}
Compiling policies in - recv Status-Server {...}
Compiling policies in - authenticate pap {...}
Compiling policies in - authenticate chap {...}
Compiling policies in - authenticate mschap {...}
Compiling policies in - accounting Start {...}
Compiling policies in - accounting Stop {...}
Compiling policies in - accounting Interim-Update {...}
Compiling policies in - accounting Accounting-On {...}
Compiling policies in - accounting Accounting-Off {...}
Compiling policies in - accounting Failed {...}
Compiling policies in - new client {...}
/usr/local/etc/raddb/sites-enabled/default[153]: Failed parsing map: Unresolved attributes not allowed in expansions here
/usr/local/etc/raddb/sites-enabled/default[153]: Failed to parse "map" subsection

how to properly use 'rlm_rest' in FreeRadius V.4.x?

0

There are 0 best solutions below