Bug 63570

Summary: NioEndpoint.populateLocalAddr() populates remote address
Product: Tomcat 9 Reporter: Aditya K <akadakia>
Component: UtilAssignee: Tomcat Developers Mailing List <dev>
Severity: regression    
Priority: P2    
Version: 9.0.22   
Target Milestone: -----   
Hardware: PC   
OS: Linux   

Description Aditya K 2019-07-17 20:04:12 UTC
package org.apache.tomcat.util.net
class NioEndpoint
commit 65fb1ee548111021edde247f3b3c409ec95a5183

Steps to reproduce:
The behavior-change/regression is evident by looking at diff above. Still if steps are required, let me know. Also, make sure that local and remote address are different while trying to reproduce E.g. Running as localhost, local and remote addresses may be same which would mask the problem.

Actual Results:
Now NioEndpoint.populateLocalAddr populates the remote address. Thus, APIs to return server's local address for e.g. RequestFacade.getLocalAddress will return the remote address.

Expected Results:
NioEndpoint.populateLocalAddr populates the local address.

Build Date & Hardware:
First encountered the bug on 7/15/19, Intel Xeon, Ubuntu 16.04 LTS, Tomcat 9.0.22.
Comment 1 Remy Maucherat 2019-07-17 22:13:54 UTC
Sorry for the trouble, the fix will be in Tomcat 9.0.23.
Comment 2 Aditya K 2019-07-18 13:37:57 UTC
(In reply to Remy Maucherat from comment #1)
> Sorry for the trouble, the fix will be in Tomcat 9.0.23.

Thank you.