From: Amos Jeffries Date: Thu, 24 Jun 2010 23:34:15 +0000 (+1200) Subject: Identify and cache the local port after connect() X-Git-Tag: take08~55^2~124^2~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=327e21312f2d78edbf4d3388663a96c031a999eb;p=thirdparty%2Fsquid.git 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. --- 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);