You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2017/01/09 00:47:16 UTC

svn commit: r1777923 - in /httpd/httpd/trunk: CHANGES server/listen.c

Author: covener
Date: Mon Jan  9 00:47:16 2017
New Revision: 1777923

URL: http://svn.apache.org/viewvc?rev=1777923&view=rev
Log:
avoid SO_REUSEPORT w/o ListenCoresBucketsRatio 

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


Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/server/listen.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1777923&r1=1777922&r2=1777923&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jan  9 00:47:16 2017
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) Don't set SO_REUSEPORT unless ListenCoresBucketsRatio is greater
+     than zero.  [Eric Covener]
+
   *) mod_http2: streaming of request output now reacts timely to data
      from other streams becoming available. Same for new incoming requests.
      [Stefan Eissing]

Modified: httpd/httpd/trunk/server/listen.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/listen.c?rev=1777923&r1=1777922&r2=1777923&view=diff
==============================================================================
--- httpd/httpd/trunk/server/listen.c (original)
+++ httpd/httpd/trunk/server/listen.c Mon Jan  9 00:47:16 2017
@@ -146,7 +146,7 @@ static apr_status_t make_sock(apr_pool_t
 #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,