somthings wrong about function channel_get_actual_remote_address()
description
function channel_get_actual_remote_address is written to get the ip address of a channel, but when we use it in function command_process_created_cell, we find that it get the same ip address about circ->n_chan and TO_OR_CIRCUIT(circ)->p_chan. But actually they have different ip address because TO_OR_CIRCUIT(circ)->p_chan is not equals to circ->n_chan, and TO_OR_CIRCUIT(circ)->p_circ_id is not equals to circ->n_circ_id.
test
If you want to check whether I am right, you can add this code into the last line in function command_process_created_cell, the funtion is written in the file command.c. I have check it in tor-0.2.8.7 and tor-0.2.7.6.
log_notice(LD_GENERAL, "p_ip_addr:%s, p_circ_id:%u, n_ip_addr:%s, n_circ_id:%u",
channel_get_actual_remote_address(TO_OR_CIRCUIT(circ)->p_chan),
TO_OR_CIRCUIT(circ)->p_circ_id,
channel_get_actual_remote_address(circ->n_chan),
cell->circ_id);
Trac:
Username: DLP_ripper