Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adrianschmutzler:
validate.c uses inet_pton for identifying IPv6 addresses [1], and this seems to not understand interface identifiers as used for Link-local IPv6 addresses.
Reproduce:
root@FFF-GW-Adrian:~# /sbin/validate_data host fdff::1 host - fdff::1 = true root@FFF-GW-Adrian:~# /sbin/validate_data host fe80::1 host - fe80::1 = true root@FFF-GW-Adrian:~# /sbin/validate_data host fe80::1%br-mesh host - fe80::1%br-mesh = false
This is a problem practically whenever validata_data is used to check uci values.
For example, it is not possible to use a link-local address for specifying an NTP server:
https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/files/sysntpd#L33
If 'server:list(host)' is changed to 'server:list(string)' there, it obviously works fine, as it's just the validation.
[1] https://git.openwrt.org/?p=project/ubox.git;a=blob;f=validate/validate.c;h=e72b8117ecd8b680778b0f5c7637ed6546a7736b;hb=HEAD#l402
The text was updated successfully, but these errors were encountered:
No branches or pull requests
adrianschmutzler:
validate.c uses inet_pton for identifying IPv6 addresses [1], and this seems to not understand interface identifiers as used for Link-local IPv6 addresses.
Reproduce:
root@FFF-GW-Adrian:~# /sbin/validate_data host fdff::1 host - fdff::1 = true root@FFF-GW-Adrian:~# /sbin/validate_data host fe80::1 host - fe80::1 = true root@FFF-GW-Adrian:~# /sbin/validate_data host fe80::1%br-mesh host - fe80::1%br-mesh = false
This is a problem practically whenever validata_data is used to check uci values.
For example, it is not possible to use a link-local address for specifying an NTP server:
https://github.com/openwrt/openwrt/blob/master/package/utils/busybox/files/sysntpd#L33
If 'server:list(host)' is changed to 'server:list(string)' there, it obviously works fine, as it's just the validation.
[1] https://git.openwrt.org/?p=project/ubox.git;a=blob;f=validate/validate.c;h=e72b8117ecd8b680778b0f5c7637ed6546a7736b;hb=HEAD#l402
The text was updated successfully, but these errors were encountered: