From: Amos Jeffries Date: Fri, 21 Nov 2014 10:07:05 +0000 (-0800) Subject: Bug 4146: workaround SSL Bump crash on Linux X-Git-Tag: merge-candidate-3-v1~477 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b41a5a1b12c56bb730392d18ba2da8042e4dcd41;p=thirdparty%2Fsquid.git Bug 4146: workaround SSL Bump crash on Linux --- diff --git a/src/comm.cc b/src/comm.cc index 659cd27c32..7800f6fbbe 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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) {}; }