hs: hs_circuitmap_get_rend_circ_client_side() doesn't consider REND_JOINED purpose
It is possible that we get a RENDEZVOUS2
cell from the service before we get the INTRODUCE_ACK
from the intro point. Which means that the rend circuit at that point, when the ack is received, its purpose is set to CIRCUIT_PURPOSE_C_REND_JOINED
which hs_circuitmap_get_rend_circ_client_side()
doesn't consider.
Here is the dicy part. It actually turns out that the legacy system has also this bug but was using log_info()
instead of warn so it probably went unnoticed.
In any cases, it doesn't matter much because once the ACK has been received, it would only warn and then exit the function correctly by closing the intro circuit and not doing more.
That being said, I think the fix here is to make hs_circuitmap_get_rend_circ_client_side()
consider REND_JOINED circuit but we should simply ignore the returned rendezvous circuit if it has been joined and warn if not so we can catch an issue like that in the future.
As for legacy, I propose we do not do anything because it's actually doing the right thing in the end and the log info doesn't alarm any user.