bneradt commented on code in PR #10749:
URL: https://github.com/apache/trafficserver/pull/10749#discussion_r1386921323


##########
src/iocore/net/SNIActionPerformer.cc:
##########
@@ -373,12 +373,12 @@ SNI_IpAllow::load(swoc::TextView content, swoc::TextView 
server_name)
   while (!content.ltrim(delim).empty()) {
     swoc::TextView token{content.take_prefix_at(delim)};
     if (swoc::IPRange r; r.load(token)) {
-      Dbg(dbg_ctl_ssl_sni, "%.*s is not a valid format", 
static_cast<int>(token.size()), token.data());
-      break;
-    } else {
       Dbg(dbg_ctl_ssl_sni, "%.*s added to the ip_allow token %.*s", 
static_cast<int>(token.size()), token.data(),
           int(server_name.size()), server_name.data());
       ip_addrs.fill(r);
+    } else {
+      Dbg(dbg_ctl_ssl_sni, "%.*s is not a valid format", 
static_cast<int>(token.size()), token.data());
+      break;

Review Comment:
   This is the functional change. It inverts the conditional because r.load 
returns true if the token is a valid IP format.



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