From: Eduard Bagdasaryan Date: Sat, 2 Apr 2022 12:10:03 +0000 (+0000) Subject: Do not ApplyTcpKeepAlive() to PortCfg-unrelated traffic (#1006) X-Git-Tag: SQUID_6_0_1~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b80935b7c530cbdde7ce9280224052838fa9b47;p=thirdparty%2Fsquid.git Do not ApplyTcpKeepAlive() to PortCfg-unrelated traffic (#1006) --- diff --git a/src/comm/TcpAcceptor.cc b/src/comm/TcpAcceptor.cc index 8aa57a9d1e..b27f0ac96b 100644 --- a/src/comm/TcpAcceptor.cc +++ b/src/comm/TcpAcceptor.cc @@ -426,7 +426,8 @@ Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details) // set socket flags commSetCloseOnExec(sock); commSetNonBlocking(sock); - Comm::ApplyTcpKeepAlive(sock, listenPort_->tcp_keepalive); + if (listenPort_) + Comm::ApplyTcpKeepAlive(sock, listenPort_->tcp_keepalive); /* IFF the socket is (tproxy) transparent, pass the flag down to allow spoofing */ F->flags.transparent = fd_table[conn->fd].flags.transparent; // XXX: can we remove this line yet?