513aae2733f6a7fa18d564934a79875dd73bc0a0 |
|
25-Nov-2015 |
Lorenzo Colitti <lorenzo@google.com> |
Improve address parsing/printing and support scoped addresses. 1. Add a parse_addr function that parses an IP address. This simplifies the code and also supports scoped addresses. 2. Make prettyprint_addr use getnameinfo instead of inet_ntop so it can support scoped addresses. 3. Modify the IPv6 address enumeration code to set the scope ID only if the address is link-local, since scope IDs are only meaningful for link-local addresses Also, we do not want to think that two addresses are different if they differ only in scope ID, because the kernel will treat them as if they are the same. 4. Modify the address equality checks in sockaddr_isequal and iface_check to check the scope ID as well. Bug: 9580643 Change-Id: I84b6b94868e50d7f6c32148b673bed7c080a4456
/external/dnsmasq/src/util.c
|