RajaMuhammadAwais opened a new pull request, #14029:
URL: https://github.com/apache/trafficserver/pull/14029

   ## Summary
   
   Fixes #13986.
   
   When `proxy.config.http.server_session_sharing.match` includes `sni`, an 
HTTPS origin session for an IP-literal origin is not reused.
   
   The issue occurs because the outbound SNI is derived from the request host, 
so an IP-literal such as `192.0.2.1` or `[2001:db8::1]` appears as the proposed 
SNI. However, `NetVCOptions::set_sni_servername()` correctly omits IP literals 
from the TLS `server_name` extension because RFC 6066 only permits DNS 
hostnames in the SNI `HostName` field.
   
   As a result:
   
   - The request proposes the IP literal as its SNI.
   - The TLS session was established without an SNI.
   - `ServerSessionPool::sni_matches()` compares the IP literal with an empty 
session SNI.
   - The comparison fails and the otherwise reusable origin session is rejected.
   
   ## Implementation
   
   The session-pool SNI matcher now detects whether the proposed SNI is an IP 
literal using the existing `ats_ip_pton()` parser.
   
   When the proposed value is a valid IPv4 or IPv6 literal, it is normalized to 
the empty/no-SNI value before comparison. This matches the behavior of 
`NetVCOptions::set_sni_servername()`, which does not send IP literals in the 
TLS SNI extension.
   
   DNS hostnames and existing SNI mismatch behavior are unchanged:
   
   - Matching DNS hostnames continue to match.
   - Different DNS hostnames continue to be rejected.
   - A hostname versus an absent SNI continues to be rejected.
   - An IP-literal origin now matches a session that was established without 
SNI.
   
   ## Tests
   
   Added regression coverage for:
   
   - IPv4 literal proposed SNI matching an absent session SNI.
   - IPv6 literal proposed SNI matching an absent session SNI.
   - Existing equal-hostname SNI matching.
   - Existing different-hostname rejection.
   - Existing one-sided SNI rejection.
   - Existing null session-SNI handling.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to