<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ubox/validate, branch master</title>
<subtitle>OpenWrt core utilities</subtitle>
<id>https://git.openwrt.org/project/ubox/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/ubox/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/'/>
<updated>2025-10-30T11:10:12Z</updated>
<entry>
<title>ubox validate: port range check fix</title>
<updated>2025-10-30T11:10:12Z</updated>
<author>
<name>Paul Donald</name>
</author>
<published>2024-09-20T15:55:13Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=6f78fa496bf36c55864a41e353df7d13f04b1077'/>
<id>urn:sha1:6f78fa496bf36c55864a41e353df7d13f04b1077</id>
<content type='text'>
The luci GUI allows a single port in a port range field. This additional
check validates a single port if a range was not found.

Signed-off-by: Paul Donald &lt;newtwen+github@gmail.com&gt;
Link: https://github.com/openwrt/ubox/pull/7
Signed-off-by: Robert Marko &lt;robimarko@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubox: Replace { 0 } with {}.</title>
<updated>2017-11-06T08:06:31Z</updated>
<author>
<name>Rosen Penev</name>
</author>
<published>2017-10-30T19:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=dd61c9f1c68b067ab841c8f4d2008075e95fe29a'/>
<id>urn:sha1:dd61c9f1c68b067ab841c8f4d2008075e95fe29a</id>
<content type='text'>
The latter is more compatible with older GCC versions like 4.9. Additionally, initializing with { 0 } produces a warning that only the first field was initialized.

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubox: Initialize conditionally uninitialized variabled</title>
<updated>2016-12-19T08:32:45Z</updated>
<author>
<name>Rosen Penev</name>
</author>
<published>2016-12-18T00:48:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=8488bb5bfdaf6ab4771622c57a62aad5fd491f06'/>
<id>urn:sha1:8488bb5bfdaf6ab4771622c57a62aad5fd491f06</id>
<content type='text'>
fixes false positive warning from "-Wconditional-uninitialized in clang"

Signed-off by: Rosen Penev &lt;rosenp@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubox: Fix some memory leaks</title>
<updated>2016-12-19T07:53:10Z</updated>
<author>
<name>Rosen Penev</name>
</author>
<published>2016-12-18T01:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=db070f15ac559e3bd406cb8b8cccf40f78e75094'/>
<id>urn:sha1:db070f15ac559e3bd406cb8b8cccf40f78e75094</id>
<content type='text'>
Avoids leaking memory when exiting early.

Signed-off by: Rosen &lt;rosenp@gmail.com&gt;
</content>
</entry>
<entry>
<title>validate: fix datatype handling of default values</title>
<updated>2016-07-26T10:16:05Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2016-07-16T12:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=ac481cdd999ee84d3f115c33a56397237e95ec64'/>
<id>urn:sha1:ac481cdd999ee84d3f115c33a56397237e95ec64</id>
<content type='text'>
Properly handle the datatype of default values when the corresponding uci
value is unset. Also consolidate the three default value code branches into
a single one.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>validate: return error on failed validation</title>
<updated>2014-06-29T11:50:16Z</updated>
<author>
<name>Luka Perkov</name>
</author>
<published>2014-06-27T14:23:43Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=c3d4118eee505f41c4d20a87f326479530837569'/>
<id>urn:sha1:c3d4118eee505f41c4d20a87f326479530837569</id>
<content type='text'>
In the procd script (/lib/functions/procd.sh) uci_validate_section is in charge
of validating the uci config files. The uci_validate_section function checks
return code of validate_data tool; without this change in case of invalid
config values the function is not able to catch errors.

Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;
</content>
</entry>
<entry>
<title>validate: add missing yes/no boolean values</title>
<updated>2014-06-28T21:16:51Z</updated>
<author>
<name>Luka Perkov</name>
</author>
<published>2014-06-27T08:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=89fa6427a27091dd501b66b9bcf009254abd7d80'/>
<id>urn:sha1:89fa6427a27091dd501b66b9bcf009254abd7d80</id>
<content type='text'>
Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;
</content>
</entry>
<entry>
<title>validate: add valid bool types enabled/disabled</title>
<updated>2014-06-28T21:16:49Z</updated>
<author>
<name>Luka Perkov</name>
</author>
<published>2014-06-27T08:09:03Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=e616114c0d3886f83706a1b505e1f5e6c0d838b8'/>
<id>urn:sha1:e616114c0d3886f83706a1b505e1f5e6c0d838b8</id>
<content type='text'>
They are already supported in config_get_bool function found in OpenWrt
base-package.

Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;
</content>
</entry>
<entry>
<title>validate: fix indentation</title>
<updated>2014-06-28T14:16:44Z</updated>
<author>
<name>Luka Perkov</name>
</author>
<published>2014-06-27T08:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=bb036b3d7af9d63f50b57bff9ffe5cb9988365ab'/>
<id>urn:sha1:bb036b3d7af9d63f50b57bff9ffe5cb9988365ab</id>
<content type='text'>
Signed-off-by: Luka Perkov &lt;luka@openwrt.org&gt;
</content>
</entry>
<entry>
<title>validate: range and base arguments for numeric types, new types hexstring, regexp and uci</title>
<updated>2014-02-23T18:38:10Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2014-02-21T15:29:11Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ubox/commit/?id=9ff5685a99dca3036f2ea4c14bdf14f7a2053d9f'/>
<id>urn:sha1:9ff5685a99dca3036f2ea4c14bdf14f7a2053d9f</id>
<content type='text'>
	- make uinteger and integer types more strict, they will not accept
	  leading spaces or plus signs anymore
	- add optional base argument to uinteger and integer data types, e.g.
	  integer(16) will accept -af or 0xaf, a base of 0 (the default) will
	  use the underlying heuristics of strtol() / strtoul()
	- add optional min and max options to string() datatype, e.g.
	  string(3) only accepts strings longer than 3 chars, string(8, 63)
	  will accept strings between 8 and 63 characters in length
	- add hexstring([minlen [, maxlen]]) type which will accept
	  long hex encoded strings whose length must be a multiple of 2
	- add regexp(pattern) type which applies an extended POSIX regular
	  expression on the value to test. The given pattern is implicitely
	  anchored, e.g. regexp("[a-z]+") will match /^[a-z]+$/
	- add uci(package, {@type|name}[, option]) type which tests the input
	  against selected uci values, e.g.
		* uci("network", "@interface") would allow values that match
		  the name of any section of type "interface" in /e/c/network
		* uci("network", "@interface", "ifname") would allow any value
		  that matches one of the ifnames in any section of type
		  interface in /e/c/network
		* uci("system", "ntp", "server") would allow any value that
		  matches on of the servers in the "server" option of the "ntp"
		  section in /e/c/system

Signed-off-by: Jo-Philipp Wich &lt;jow@openwrt.org&gt;
</content>
</entry>
</feed>
