[OpenWrt-Devel] Using "-" in section names

Jo-Philipp Wich jow at openwrt.org
Wed Aug 27 14:38:16 EDT 2014

> So, it shouldn't be necessary with the C implementation?

Correct, but that cannot be changed without breaking support for legacy

>> Simply replacing dashes with underscores is not possible either as this
>> would lead to ambiguous results.
> Yes, I've got exactly this problem: the name of a section is supposed to
> be a physical interface name.  But both "-" and "_" are valid characters
> in the name of an interface on Linux, so it would be ambiguous to convert
> one to the other.

Even if "-" would be allowed you'd still need to deal with "@", ".",
"#", ":" and other funny characters that are legal in ifnames.

The only suitable way using the existing syntax constraints is to use an
option value, similar to how /etc/config/network is structured e.g.
config interface; option name "eth0.1"

~ Jow
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list