SolidWallOfCode commented on code in PR #9618:
URL: https://github.com/apache/trafficserver/pull/9618#discussion_r1175718248
##########
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:
Yes. The value is the literal string "true" or the literal string "false"
from the ternary operator. This is a common pattern for printing boolean values.
--
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]