The API TSHttpTxnClientIncomingPortGet has been changed in Wed Oct 5 19:14:07 2011 (
TS-926) and it returns another value.
in the old version it returned the incoming port of the TS(the port which the client connected to the TS).
in the new version the returned value is the sending port of the user.
The different is in the line:
- return sm->t_state.client_info.port;
+ return ink_inet_get_port(&sm->t_state.client_info.addr);
The assignment of those two members (port, addr) are in the HttpSM.cc file
t_state.client_info.port = netvc->get_local_port();
The old code gave the right answer from the port member, and the new one gives us wrong answer from the remote address.
I attached a patch to fix this returned value.