[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ICMP response gets lost
The ICMP error is valid and sucessfully delivered to tcp_notify(), but
the socket isn't immediately notified on the first error.
tcp_notify() first sets a softerror, and only after the third such error
is received (and the socket is still not connected) will it set
so_error.
Which means you have to wait a little for telnet to get notfied:
Without return-icmp (just silently blocking)
$ telnet 62.65.145.30 9999
Trying 62.65.145.30...
telnet: connect to address 62.65.145.30: Connection timed out
With return-icmp
$ telnet 62.65.145.30 9999
Trying 62.65.145.30...
telnet: connect to address 62.65.145.30: Connection refused
In both cases, it takes several retransmission (> 30s) before the client
gets the error.
I guess you just didn't wait long enough :)
Considering this, it makes more sense to return-rst for TCP, if you want
to keep retransmission low.
Daniel