mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Tighten assert_cpath_layer_ok assumptions
svn:r1904
This commit is contained in:
parent
b37450ce55
commit
80be19d9da
@ -395,14 +395,15 @@ int _circuit_mark_for_close(circuit_t *circ) {
|
|||||||
*/
|
*/
|
||||||
void assert_cpath_layer_ok(const crypt_path_t *cp)
|
void assert_cpath_layer_ok(const crypt_path_t *cp)
|
||||||
{
|
{
|
||||||
tor_assert(cp->f_crypto);
|
|
||||||
tor_assert(cp->b_crypto);
|
|
||||||
// tor_assert(cp->addr); /* these are zero for rendezvous extra-hops */
|
// tor_assert(cp->addr); /* these are zero for rendezvous extra-hops */
|
||||||
// tor_assert(cp->port);
|
// tor_assert(cp->port);
|
||||||
switch(cp->state)
|
switch(cp->state)
|
||||||
{
|
{
|
||||||
case CPATH_STATE_CLOSED:
|
|
||||||
case CPATH_STATE_OPEN:
|
case CPATH_STATE_OPEN:
|
||||||
|
tor_assert(cp->f_crypto);
|
||||||
|
tor_assert(cp->b_crypto);
|
||||||
|
/* fall through */
|
||||||
|
case CPATH_STATE_CLOSED:
|
||||||
tor_assert(!cp->handshake_state);
|
tor_assert(!cp->handshake_state);
|
||||||
break;
|
break;
|
||||||
case CPATH_STATE_AWAITING_KEYS:
|
case CPATH_STATE_AWAITING_KEYS:
|
||||||
|
Loading…
Reference in New Issue
Block a user