lzx404243 commented on code in PR #9618:
URL: https://github.com/apache/trafficserver/pull/9618#discussion_r1177149632


##########
iocore/net/SNIActionPerformer.cc:
##########
@@ -92,3 +94,111 @@ SNI_IpAllow::TestClientSNIAction(char const *servrername, 
IpEndpoint const &ep,
 {
   return ip_addrs.contains(swoc::IPAddr(ep));
 }
+
+TunnelDestination::bwf_map_type TunnelDestination::bwf_map;
+
+TunnelDestination::TunnelDestination(const std::string_view &dest, 
SNIRoutingType type, YamlSNIConfig::TunnelPreWarm prewarm,
+                                     const std::vector<int> &alpn)
+  : destination(dest), type(type), tunnel_prewarm(prewarm), alpn_ids(alpn)
+{
+  // Get a view of the port text. If there is a substitution there, @a port 
will end up empty while
+  // rest (stuff after port) will be non-empty. If both are empty there is no 
port specified at all.
+  std::string_view port_text, rest;
+  swoc::IPEndpoint::tokenize(destination, nullptr, &port_text, &rest);
+  dynamic_port_p = port_text.empty() && !rest.empty();
+
+  Debug("ssl_sni", "port is %s", dynamic_port_p ? "true" : "false");

Review Comment:
   Would you like to add the string `dynamic`after the `is ` though?  I think 
`port is dynamic: true`  is a little more informative than `port is true` .



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