Accessing %{client:...} in C custom module

Stefan Paetow Stefan.Paetow at jisc.ac.uk
Wed Mar 2 11:08:58 CET 2016


>                 suffix
>                 if (%{client:group} == "8021X") {
>                         eap
>                 }
>  ....
>}
>====
>running radiusd -X will result in
>====
>...
>(7)     if (%{client:group} == "8021X") {
>(7)     if (%{client:group} == "8021X")  -> FALSE
>...
>====
>And I am more than sure that `group` attribute is defined for this client.
>
>Additionally, you can not check for attribute existence:
>/usr/local/etc/raddb/radiusd.conf[250]: Parse error in condition
>/usr/local/etc/raddb/radiusd.conf[250]: (%{client:group}) {
>/usr/local/etc/raddb/radiusd.conf[250]:  ^ Expected a module return code

Try this:

if ("%{client:group}" == '8021X') {
:
:

:-)

Stefan Paetow
Moonshot Industry & Research Liaison Coordinator

t: +44 (0)1235 822 125
gpg: 0x3FCE5142
xmpp: stefanp at jabber.dev.ja.net
skype: stefan.paetow.janet

jisc.ac.uk

Networkshop44, University of Manchester. Save the date: 22-24 March, 2016.
#NWS44

Jisc is a registered charity (number 1149740) and a company limited by
guarantee which is registered in England under Company No. 5747339, VAT
No. GB 197 0632 86. JiscĀ¹s registered office is: One Castlepark, Tower
Hill, Bristol, BS2 0JA. T 0203 697 5800.

Jisc Collections and Janet Ltd. is a wholly owned Jisc subsidiary and a
company limited by guarantee which is registered in England under Company
No. number 2881024, VAT No. GB 197 0632 86. The registered office is:
Lumen House, Library Avenue, Harwell, Didcot, Oxfordshire, OX11 0SG. T
01235 822200.





>




More information about the Freeradius-Devel mailing list