]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4146: workaround SSL Bump crash on Linux
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 21 Nov 2014 10:07:05 +0000 (02:07 -0800)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 21 Nov 2014 10:07:05 +0000 (02:07 -0800)
src/comm.cc

index 659cd27c32567e25944e6afe2c8c040c6a451b5c..7800f6fbbe058681f1d7db6a36d510bb59de668e 100644 (file)
@@ -102,9 +102,14 @@ static void
 comm_empty_os_read_buffers(int fd)
 {
 #if _SQUID_LINUX_
+#if USE_OPENSSL
+    // Bug 4146: SSL-Bump BIO does not release sockets on close.
+    if (fd_table[fd].ssl)
+        return;
+#endif
+
     /* prevent those nasty RST packets */
     char buf[SQUID_TCP_SO_RCVBUF];
-
     if (fd_table[fd].flags.nonblocking) {
         while (FD_READ_METHOD(fd, buf, SQUID_TCP_SO_RCVBUF) > 0) {};
     }