You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/11 21:12:35 UTC

[GitHub] [trafficserver] sudheerv commented on a change in pull request #7802: SSL Cert lookup using PP dest ip when ProxyProtocol is enabled

sudheerv commented on a change in pull request #7802:
URL: https://github.com/apache/trafficserver/pull/7802#discussion_r630544195



##########
File path: iocore/net/SSLUtils.cc
##########
@@ -299,7 +300,27 @@ set_context_cert(SSL *ssl)
     IpEndpoint ip;
     int namelen = sizeof(ip);
 
-    if (0 == safe_getsockname(netvc->get_socket(), &ip.sa, &namelen)) {
+    SSLCertificateConfig::scoped_config lookup;
+    if (netvc->get_is_proxy_protocol() && netvc->get_proxy_protocol_version() != ProxyProtocolVersion::UNDEFINED) {
+      ip.sa = *(netvc->get_proxy_protocol_dst_addr());
+      ip_port_text_buffer ipb1;

Review comment:
       Ack.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org