[FS#3221] ubox: validate.c: Link-Local IPv6 with interface ID not supported

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Fri Jul 10 07:12:59 EDT 2020


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Adrian Schmutzler (adrianschmutzler) 

Attached to Project - OpenWrt/LEDE Project
Summary - ubox: validate.c: Link-Local IPv6 with interface ID not supported
Task Type - Bug Report
Category - Packages
Status - New
Assigned To - 
Operating System - All
Severity - Low
Priority - Low
Reported Version - All
Due in Version - Undecided
Due Date - Undecided
Details - 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 at FFF-GW-Adrian:~# /sbin/validate_data host fdff::1
host - fdff::1 = true
root at FFF-GW-Adrian:~# /sbin/validate_data host fe80::1
host - fe80::1 = true
root at 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

More information can be found at the following URL:
https://bugs.openwrt.org/index.php?do=details&task_id=3221

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.



More information about the openwrt-bugs mailing list