From 82a224764e9942b33a7c4b76261cbc9c1fe8f5d1 Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 15 Apr 2021 23:18:09 +0200 Subject: [PATCH] Improve pre-authenticated port check --- firewall/interception.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firewall/interception.go b/firewall/interception.go index 4edc790c..366990ed 100644 --- a/firewall/interception.go +++ b/firewall/interception.go @@ -307,7 +307,7 @@ func initialHandler(conn *network.Connection, pkt packet.Packet) { log.Tracer(pkt.Ctx()).Trace("filter: handing over to connection-based handler") // Check for pre-authenticated port. - if localPortIsPreAuthenticated(conn.Entity.Protocol, conn.LocalPort) { + if !conn.Inbound && localPortIsPreAuthenticated(conn.Entity.Protocol, conn.LocalPort) { // Approve connection. conn.Accept("connection by Portmaster", noReasonOptionKey) conn.Internal = true