You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2022/08/01 10:45:09 UTC

[tomcat] branch 10.0.x updated (99080de72c -> cb85689a08)

This is an automated email from the ASF dual-hosted git repository.

markt pushed a change to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


    from 99080de72c Add release date for 10.0.23
     new 8b771c81e0 Duplicate accept checks are not required in unix domain socket mode
     new cb85689a08 Add a changelog entry for #532

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 java/org/apache/tomcat/util/net/AprEndpoint.java | 4 ++--
 java/org/apache/tomcat/util/net/NioEndpoint.java | 4 ++--
 webapps/docs/changelog.xml                       | 8 ++++++++
 3 files changed, 12 insertions(+), 4 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 01/02: Duplicate accept checks are not required in unix domain socket mode

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 8b771c81e033eedde168bba1ab028ac850a1689e
Author: lihan <ao...@gmail.com>
AuthorDate: Mon Jul 18 12:52:11 2022 +0800

    Duplicate accept checks are not required in unix domain socket mode
---
 java/org/apache/tomcat/util/net/AprEndpoint.java | 4 ++--
 java/org/apache/tomcat/util/net/NioEndpoint.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/AprEndpoint.java b/java/org/apache/tomcat/util/net/AprEndpoint.java
index 5b7c457880..fa765f1ad3 100644
--- a/java/org/apache/tomcat/util/net/AprEndpoint.java
+++ b/java/org/apache/tomcat/util/net/AprEndpoint.java
@@ -813,8 +813,8 @@ public class AprEndpoint extends AbstractEndpoint<Long,Long> implements SNICallB
             // Do the duplicate accept check here rather than in serverSocketaccept()
             // so we can cache the results in the SocketWrapper
             AprSocketWrapper wrapper = new AprSocketWrapper(socket, this);
-            // Bug does not affect Windows. Skip the check on that platform.
-            if (!JrePlatform.IS_WINDOWS) {
+            // Bug does not affect Windows platform and Unix Domain Socket. Skip the check.
+            if (!JrePlatform.IS_WINDOWS && getUnixDomainSocketPath() == null) {
                 long currentNanoTime = System.nanoTime();
                 if (wrapper.getRemotePort() == previousAcceptedPort) {
                     if (wrapper.getRemoteAddr().equals(previousAcceptedAddress)) {
diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index ddcdcd39ab..fbd860741f 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -519,8 +519,8 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel>
     protected SocketChannel serverSocketAccept() throws Exception {
         SocketChannel result = serverSock.accept();
 
-        // Bug does not affect Windows. Skip the check on that platform.
-        if (!JrePlatform.IS_WINDOWS) {
+        // Bug does not affect Windows platform and Unix Domain Socket. Skip the check.
+        if (!JrePlatform.IS_WINDOWS && getUnixDomainSocketPath() == null) {
             SocketAddress currentRemoteAddress = result.getRemoteAddress();
             long currentNanoTime = System.nanoTime();
             if (currentRemoteAddress.equals(previousAcceptedSocketRemoteAddress) &&


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[tomcat] 02/02: Add a changelog entry for #532

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit cb85689a080389595e658dd79cb768129820a275
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Aug 1 11:41:29 2022 +0100

    Add a changelog entry for #532
---
 webapps/docs/changelog.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d55b9fbde0..592e1b3602 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 10.0.24 (markt)" rtext="in development">
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        Avoid potential NPE by skipping duplicate accept check when using a Unix
+        Domain Socket. Based on <pr>532</pr> by Han Li. (markt)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 10.0.23 (markt)" rtext="2022-07-27">
   <subsection name="Catalina">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org