Uci commit/reload_config successful in spite of invalid configuration options and values

Hello,

I've been recently playing around with various access point configurations using OpenWrt (on GL-AR750S). Yesterday I've discovered, that no matter the options and values I put into the configs, the AP successfully reconfigures and ignores the mistakes. Is there a way of checking the validity of configuration files? I would expect some parsing error, warning about detected line that is invalid.
For example " uci set wireless.@wifi-device[0].wrongSection='wrongInput' " is valid. I've tried explicitly forcing strict mode with "-s" option, I've tried to run "uci validate" and nothing indicated a wrong settings in configuration file.

To find out if an option/value is recognized by AP is crucial, - how can I otherwise know that it took the desired effect?

Thanks to anyone who will try to response to this in advance and have a great day!

Usually, by observing the produced effect desired thru your configuration.

It's also possible to generate configurations for other devices, demonstrate settings, etc. That functionality would dissappear - but you could ask the developers or work on a feature request (I'm sure the developers would prefer the latter). Feel free to ask!

Also, you could use the LuCI web GUI if you're having an issue with proper syntax/errors when typing/etc.

Have a great day as well!

1 Like

First of all- thanks for making time and replying!

I was afraid this was the case :D. I can always try and watch the desired function (or proof by contradiction, set n-only mode, try connect device without n capabilities etc) or try to deduce the state from sniffing the traffic. But I'm automating some AP configurations and it would be a big help if the device screamed at me "I don't know this htmode", or "I don't know greenfield since I don't posses 11n capabilities" in the case of 1) typos, 2) AP's lack of capabilities.

However, if it is not the case, I'm sure it will do. Once again, thanks for taking the time to reply. :slight_smile: Cheers!

The only error output I have ever seen in uci is if a line or block are removed but doesn’t exist or if the specific variable doesn’t exist.

But variable values can probably be what ever since they are a string. But if the value will actually do anything is another thing.

This kind of fault overwatch function will in the bottom line be a result of memory size of the devices. And that size is small.

1 Like