File module processing error "Invalid operator"

Chinnapaiyan, Nagamani nagamani.chinnapaiyan at viasat.com
Mon Oct 30 14:27:23 UTC 2023


Hi,


I am seeing "Invalid operator" error on a file module.



# /usr/sbin/radiusd -X

Info  : Copyright 1999-2023 The FreeRADIUS server project and contributors

Info  : There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

Info  : PARTICULAR PURPOSE

Info  : You may redistribute copies of FreeRADIUS under the terms of the

Info  : GNU General Public License

Info  : For more information about these matters, see the file named COPYRIGHT

Info  : Starting - reading configuration files ...

Debug : Including dictionary file "/etc/raddb/dictionary"

Debug : including configuration file /etc/raddb/radiusd.conf

Debug : Including files in directory "/etc/raddb/template.d/"

Debug : including configuration file /etc/raddb/template.d/default

Debug : including configuration file /etc/raddb/clients.conf

Debug : Including files in directory "/etc/raddb/global.d/"

Debug : including configuration file /etc/raddb/global.d/ldap

Debug : Including files in directory "/etc/raddb/mods-enabled/"

Debug : including configuration file /etc/raddb/mods-enabled/always

Debug : including configuration file /etc/raddb/mods-enabled/files

Debug : including configuration file /etc/raddb/mods-enabled/ldap

Debug : including configuration file /etc/raddb/mods-enabled/linelog_dhcp

Debug : including configuration file /etc/raddb/mods-enabled/redis

Debug : including configuration file /etc/raddb/mods-enabled/redis_ippool

Debug : including configuration file /etc/raddb/mods-enabled/unpack

Debug : Including files in directory "/etc/raddb/policy.d/"

...

...

Debug : rlm_redis (redis) [1] - Reserved connection (0)

Debug : rlm_redis (redis) [1] - Released connection (0)

Debug : Instantiating rlm_always "reject"

Debug : Instantiating rlm_files "subnet_policy"

Debug : Reading file /etc/raddb/mods-config/files/subnet_policies

Error : /etc/raddb/mods-config/files/subnet_policies[1692]: dhcpv4.Router-Address := 25.26.0.1,

Error : /etc/raddb/mods-config/files/subnet_policies[1692]:                        ^ Invalid operator

Error : Failed reading /etc/raddb/mods-config/files/subnet_policies

Error : /etc/raddb/mods-enabled/files[25]: Instantiation failed for module "subnet_policy"





After removing some commented lines or adding some empty lines or empty spaces in the file module, the error goes away.



pwd:/etc/raddb/mods-config/files

subnet_policies is the file module which gives this error. below is the diff between the problematic file and working file. Just removed a line.



# wc subnet_policies*

  4438   7982 111085 subnet_policies

  4439   7983 111161 subnet_policies.problem



# diff subnet_policies.problem subnet_policies

1d0

< ###########################################################################





Debug : rlm_redis (redis) [1] - Reserved connection (0)

Debug : rlm_redis (redis) [1] - Released connection (0)

Debug : Instantiating rlm_always "reject"

Debug : Instantiating rlm_files "subnet_policy"

Debug : Reading file /etc/raddb/mods-config/files/subnet_policies

Debug : Instantiating rlm_files "subscriber_host_policy"

Debug : Reading file /etc/raddb/mods-config/files/host_policies





Regards,
Nagamani Chinnapaiyan


More information about the Freeradius-Users mailing list