]> granicus.if.org Git - apache/commitdiff
Merge r1777923 from trunk:
authorJoe Orton <jorton@apache.org>
Fri, 17 Mar 2017 08:30:16 +0000 (08:30 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 17 Mar 2017 08:30:16 +0000 (08:30 +0000)
avoid SO_REUSEPORT w/o ListenCoresBucketsRatio

Can lead to unintended/confusing sharing between
multiple servers started by the same ID.

Submitted by: covener
Reviewed by: jorton, covener, wrowe

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1787301 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/listen.c

diff --git a/CHANGES b/CHANGES
index 003ffe897c432ff474364cc0c1ab49b8b03f6ec7..c77d71e9e51501088950b46f89e4e57e21c77eed 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.26
 
+  *) Don't set SO_REUSEPORT unless ListenCoresBucketsRatio is greater
+     than zero.  [Eric Covener]
+
   *) mod_http2: moving session cleanup to pre_close hook to avoid races with
      modules already shut down and slave connections still operating.
      [Stefan Eissing]
index 98cd117c567b1082078b7e0e936afa792452cc6f..d44c7c9f44ce0e05c908b6c0de526d6646fc7ab3 100644 (file)
@@ -153,7 +153,7 @@ static apr_status_t make_sock(apr_pool_t *p, ap_listen_rec *server)
 #endif
 
 #if defined(SO_REUSEPORT)
-    if (ap_have_so_reuseport) {
+    if (ap_have_so_reuseport && ap_listencbratio > 0) {
         int thesock;
         apr_os_sock_get(&thesock, s);
         if (setsockopt(thesock, SOL_SOCKET, SO_REUSEPORT,