From 327e21312f2d78edbf4d3388663a96c031a999eb Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 25 Jun 2010 11:34:15 +1200 Subject: [PATCH] Identify and cache the local port after connect() This will be needed for debug traces, logging and outbound myport ACL. TODO: do the same for the local address when requesting wildcard. at present it still shows 0.0.0.0:port. --- src/client_side_request.cc | 2 +- src/comm/ConnectStateData.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/client_side_request.cc b/src/client_side_request.cc index 26093dda96..35361a5412 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -541,7 +541,7 @@ ClientRequestContext::clientAccessCheck2() acl_checklist = clientAclChecklistCreate(Config.accessList.adapted_http, http); acl_checklist->nonBlockingCheck(clientAccessCheckDoneWrapper, this); } else { - debugs(85, 2, HERE << "No adapted_http_access configuration."); + debugs(85, 2, HERE << "No adapted_http_access configuration. default: ALLOW"); clientAccessCheckDone(ACCESS_ALLOWED); } } diff --git a/src/comm/ConnectStateData.cc b/src/comm/ConnectStateData.cc index 3f3005aa56..bccaf1e505 100644 --- a/src/comm/ConnectStateData.cc +++ b/src/comm/ConnectStateData.cc @@ -137,10 +137,11 @@ ConnectStateData::connect() if (active->getPeer()) active->getPeer()->stats.conn_open++; - /* TODO: remove this fd_table access. But old code still depends on fd_table flags to + /* TODO: remove these fd_table accesses. But old code still depends on fd_table flags to * indicate the state of a raw fd object being passed around. */ fd_table[active->fd].flags.open = 1; + active->local.SetPort(comm_local_port(active->fd)); ipcacheMarkGoodAddr(host, active->remote); callCallback(COMM_OK, 0); -- 2.47.3