mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
libfetch: parse IPv4address in IPv6address properly
This fix parsing problems of IPv6 addresses which contains IPv4 addresses. One example is ::192.168.0.1. Documents are in below: https://datatracker.ietf.org/doc/html/rfc2373#page-22 Sponsored by: Juniper Networks, Inc. MFC after: 1 week Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D45896
This commit is contained in:
parent
7c2901b08b
commit
8cd71a0e01
@ -399,7 +399,7 @@ fetchParseURL(const char *URL)
|
||||
|
||||
/* hostname */
|
||||
if (*p == '[') {
|
||||
q = p + 1 + strspn(p + 1, ":0123456789ABCDEFabcdef");
|
||||
q = p + 1 + strspn(p + 1, ":0123456789ABCDEFabcdef.");
|
||||
if (*q++ != ']')
|
||||
goto ouch;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user