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 01:05:02 UTC

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

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



##########
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:
       It looks like `ipb1` is declared on line 312 again. This `ipb1` and the debug message of line 308 looks unnecessary.




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