Improve pre-authenticated port check

This commit is contained in:
Daniel 2021-04-15 23:18:09 +02:00
parent f8e5f81a2e
commit 82a224764e

View file

@ -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