From 07c4746c59553cdd4c7284aa108d7f0a02f0a44f Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 16 Oct 2026 04:38:58 +0000 Subject: [PATCH] Correct the comment on asIPv4 in isBlockedIP Its last sentence said asIPv4 differs from addr only for an IPv4-compatible address, which is untrue for any other IPv6 address, where asIPv4 is the zero netip.Addr. It now says that matching asIPv4 as well as addr refuses more only for an IPv4-compatible address. Model: opus-5-5 --- internal/httpfetcher/httpfetcher.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/httpfetcher/httpfetcher.go b/internal/httpfetcher/httpfetcher.go index f4c705e..29373f4 100644 --- a/internal/httpfetcher/httpfetcher.go +++ b/internal/httpfetcher/httpfetcher.go @@ -618,8 +618,8 @@ func isBlockedIP(ip net.IP, blocked []netip.Prefix) bool { addr = addr.Unmap() // ip read as IPv4 where it is or holds an IPv4 address, otherwise the - // zero netip.Addr, which no prefix contains. It differs from addr only - // for an IPv4-compatible address. + // zero netip.Addr, which no prefix contains. Matching asIPv4 as well as + // addr refuses more only for an IPv4-compatible address. asIPv4, _ := netip.AddrFromSlice(ipv4CompatibleToIPv4(ip).To4()) return slices.ContainsFunc(blocked, func(prefix netip.Prefix) bool {