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


##########
src/iocore/net/ConnectionTracker.cc:
##########
@@ -139,37 +149,54 @@ Config_Update_Conntrack_Alert_Delay(const char *name, 
RecDataT dtype, RecData da
 } // namespace
 
 void
-OutboundConnTrack::config_init(GlobalConfig *global, TxnConfig *txn)
+ConnectionTracker::config_init(GlobalConfig *global, TxnConfig *txn)
 {
   _global_config = global; // remember this for later retrieval.
                            // Per transaction lookup must be done at call time 
because it changes.
 
-  Enable_Config_Var(CONFIG_VAR_MIN, &Config_Update_Conntrack_Min, txn);
-  Enable_Config_Var(CONFIG_VAR_MAX, &Config_Update_Conntrack_Max, txn);
-  Enable_Config_Var(CONFIG_VAR_MATCH, &Config_Update_Conntrack_Match, txn);
-  Enable_Config_Var(CONFIG_VAR_ALERT_DELAY, 
&Config_Update_Conntrack_Alert_Delay, global);
+  Enable_Config_Var(CONFIG_SERVER_VAR_MIN, &Config_Update_Conntrack_Min, txn);
+  Enable_Config_Var(CONFIG_SERVER_VAR_MAX, &Config_Update_Conntrack_Max, txn);
+  Enable_Config_Var(CONFIG_SERVER_VAR_MATCH, &Config_Update_Conntrack_Match, 
txn);
+  Enable_Config_Var(CONFIG_SERVER_VAR_ALERT_DELAY, 
&Config_Update_Conntrack_Alert_Delay, global);
+}
+
+ConnectionTracker::TxnState
+ConnectionTracker::obtain_inbound(IpEndpoint const &addr)
+{
+  TxnState zret;
+  CryptoHash hash;
+  Group::Key key{addr, hash, MatchType::MATCH_IP};
+  std::lock_guard<std::mutex> lock(_imp._mutex); // Table lock
+  auto loc = _imp._table.find(key);
+  if (loc != _imp._table.end()) {
+    zret._g = loc;
+  } else {
+    zret._g = new Group(key, "", 0);

Review Comment:
   Now that this is client side, we'll need to figure out Group deletion.



-- 
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: github-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to