SolidWallOfCode commented on code in PR #9767:
URL: https://github.com/apache/trafficserver/pull/9767#discussion_r1222066118


##########
iocore/net/YamlSNIConfig.cc:
##########
@@ -178,6 +220,28 @@ template <> struct convert<YamlSNIConfig::Item> {
     } else {
       return false; // servername must be present
     }
+
+    if (node[TS_inbound_port_range]) {
+      swoc::TextView port_view{node[TS_inbound_port_range].Scalar()};
+      auto min{port_view.split_prefix_at('-')};
+      if (!min) {
+        min = port_view;
+      }
+      auto const &max{port_view};
+
+      swoc::TextView parsed_min;
+      long min_port{swoc::svtoi(min, &parsed_min)};
+      swoc::TextView parsed_max;
+      long max_port{swoc::svtoi(max, &parsed_max)};
+      if (parsed_min != min || min_port < 1 || parsed_max != max || max_port > 
std::numeric_limits<uint16_t>::max() ||
+          max_port < min_port) {
+        std::string out;

Review Comment:
   Use `ts::bw_dbg` instead of `out`.



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