From de8fb1b3835758998a53d772deeebcdb71bbb823 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Fri, 13 Jun 2025 22:53:42 +0200 Subject: [PATCH] tcp: fix local blackholing The sysctl-variable net.inet.tcp.blackhole_local should affect TCP segments from an IPv6 address of the local host, not of a host on the local area network. Thanks to cc@ for pointing me to the issue. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D50828 --- sys/netinet/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index c00a102e852..1c617b85ef8 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1385,7 +1385,7 @@ dropwithreset: ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && (V_blackhole_local || ( #ifdef INET6 - isipv6 ? !in6_localaddr(&ip6->ip6_src) : + isipv6 ? !in6_localip(&ip6->ip6_src) : #endif #ifdef INET !in_localip(ip->ip_src)