Opened 12 years ago

Last modified 7 years ago

#444 closed defect (Fixed)

connecting to a hidden service port that does not exist kills existing connections

Reported by: weasel Owned by: arma
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.2.0.1-alpha
Severity: Keywords:
Cc: weasel, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This is either a bug in the hidden service, or in the client code, I don't know which.

Symptoms: If you have a connection established to a hidden service on some port,
and then open a new connection to a port that it does not listen on your already
existing connection is torn down.

e.g.:
socat TCP4-LISTEN:4242,fork SOCKS4A:localhost:37lnq2veifl4kar7.onion:6667,socksport=9050 &
telnet to localhost 4242, log on to IRC.

socat TCP4-LISTEN:4343,fork SOCKS4A:localhost:37lnq2veifl4kar7.onion:80,socksport=9050
telnet localhost 4343 -> irc connection dies.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 12 years ago by arma

rend_service_set_connection_addr_port() returns -1 if it can't find a
port assigned to whatever the client tries.

Then in connection_exit_begin_conn() we declare

/* knock the whole thing down, somebody screwed up */
circuit_mark_for_close(circ, END_CIRC_REASON_CONNECTFAILED);
tor_free(address);
return 0;

So this was intended as a feature when it first went in. :)
We could remove the circuit_mark_for_close() and I bet the world
wouldn't end.

comment:2 Changed 12 years ago by nickm

I agree with roger. Instead of knocking the circuit down, we should just stop after sending the RELAY_END cell.

comment:3 Changed 12 years ago by arma

Fixed in r10478

comment:4 Changed 12 years ago by arma

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.