Many functions log before checking for proto violation
rend_mid_establish_intro()
:
log_info(LD_REND,
"Received an ESTABLISH_INTRO request on circuit %d",
circ->p_circ_id);
rend_mid_introduce()
:
log_info(LD_REND, "Received an INTRODUCE1 request on circuit %d",
circ->p_circ_id);
rend_mid_establish_rendezvous()
:
log_info(LD_REND, "Received an ESTABLISH_RENDEZVOUS request on circuit %d",
circ->p_circ_id);
< [censored]> check proto was places exactly to filter that. some one encodes something before it, that is bug.
< asn> check proto?
< asn> ye, rend_mid_rendezvous() does the stupid encoding thing before checking for proto violation, like you said.
< [censored]> most of that funcs is wrong.
< [censored]> some logs about recved stuff. why if it wrong cell in wrong circ?
< asn> then you get two logs
< asn> one that says "received..." and another that says "rejecting..."
< asn> in the case of rend_mid_establish_intro() for example
< [censored]> why? another funcs can't report about recved cell without encode. no one funcs should log anything before checks.
< asn> ok. i'm more than fine with "checks first, everything afterwards (including logs)"