git: 4fb85732b876 - stable/14 - libfetch: parse IPv4address in IPv6address properly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 15 Nov 2026 17:28:45 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=4fb85732b8766f04735ca658c4d6d4f950ae70d7
commit 4fb85732b8766f04735ca658c4d6d4f950ae70d7
Author: Ka Ho Ng <khng@FreeBSD.org>
AuthorDate: 2024-07-11 19:48:28 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-11-14 15:49:23 +0000
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
(cherry picked from commit 8cd71a0e01d60cc4eb0cdef3c62556a516976b77)
---
lib/libfetch/fetch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c
index c00e6721bbbc..391cd76df25b 100644
--- a/lib/libfetch/fetch.c
+++ b/lib/libfetch/fetch.c
@@ -406,7 +406,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 {