Hi all, I try to use the virtual server 'check-eap-tls', but when I start FreeRadius with '-radiusd -XXXX' I have this error : Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: Parse error in condition Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ("host/%{TLS-Client-Cert-Common-Name}" == &User-Name) { Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ^ Cannot use attribute reference on right side of condition I dont understand this error because in mods-enable eap.conf, I un-commented virtual_server = check-eap-tls So normaly, he had acces to this attribute no ? Thanks for ur helps Regards, Thomas
On 17 Aug 2016, at 16:29, Thomas Massip <thomas.massip@e-tera.com> wrote:
Hi all,
I try to use the virtual server 'check-eap-tls', but when I start FreeRadius with '-radiusd -XXXX' I have this error :
Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: Parse error in condition Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ("host/%{TLS-Client-Cert-Common-Name}" == &User-Name) { Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ^ Cannot use attribute reference on right side of condition
Just reverse the order of the operands. (&User-Name == "host/%{TLS-Client-Cert-Common-Name}”) It’s because the condition evaluator infers the type from the thing on the left, and so requires that to be an attribute reference if the condition contains one. It’s an old vestigial thing from the original condition code. Hopefully it can be fixed in future. Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
On Wed, Aug 17, 2016 at 04:29:37PM +0200, Thomas Massip wrote:
I try to use the virtual server 'check-eap-tls', but when I start FreeRadius with '-radiusd -XXXX' I have this error :
"radiusd -X" should be all that is needed.
Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: Parse error in condition Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ("host/%{TLS-Client-Cert-Common-Name}" == &User-Name) { Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ^ Cannot use attribute reference on right side of condition
Hmm, the attribute is on the right side of the condition. Try switching them around. if (&User-Name == "host/%{TLS-Client-Cert-Common-Name}") { It's a typo in the default config. I've pushed a fix. Matthew -- Matthew Newton, Ph.D. <mcn4@leicester.ac.uk> Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk>
Le 2016-08-17 16:40, Matthew Newton a écrit :
On Wed, Aug 17, 2016 at 04:29:37PM +0200, Thomas Massip wrote:
I try to use the virtual server 'check-eap-tls', but when I start FreeRadius with '-radiusd -XXXX' I have this error :
"radiusd -X" should be all that is needed.
I know but I love XXXX :D
Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: Parse error in condition Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ("host/%{TLS-Client-Cert-Common-Name}" == &User-Name) { Wed Aug 17 16:18:39 2016 : Error: /opt/fr3/etc/raddb/sites-enabled/check-eap-tls[63]: ^ Cannot use attribute reference on right side of condition
Hmm, the attribute is on the right side of the condition. Try switching them around.
if (&User-Name == "host/%{TLS-Client-Cert-Common-Name}") {
It's a typo in the default config. I've pushed a fix.
Matthew
Ok thanks all, if (&User-Name == "host/%{TLS-Client-Cert-Common-Name}") works fine now. Regards, Thomas
participants (3)
-
Arran Cudbard-Bell -
Matthew Newton -
Thomas Massip