diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-06-30 15:45:02 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-07-02 09:51:03 -0400 |
commit | 81d312f12c196a87f6fb0a4ba7c445afe95b6d4a (patch) | |
tree | 25abc676c57c29e922fb778d884f7fd7836364ab /src/core/or/channeltls.c | |
parent | 8f362b7bce5ebbba5c8d79cf10c5ec42bbde1519 (diff) | |
download | tor-81d312f12c196a87f6fb0a4ba7c445afe95b6d4a.tar.gz tor-81d312f12c196a87f6fb0a4ba7c445afe95b6d4a.zip |
Add a function for comparing the orport on an extendinfo.
Diffstat (limited to 'src/core/or/channeltls.c')
-rw-r--r-- | src/core/or/channeltls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/or/channeltls.c b/src/core/or/channeltls.c index f9937ce880..a51fbf1dd6 100644 --- a/src/core/or/channeltls.c +++ b/src/core/or/channeltls.c @@ -63,10 +63,10 @@ #include "trunnel/channelpadding_negotiation.h" #include "trunnel/netinfo.h" #include "core/or/channelpadding.h" +#include "core/or/extendinfo.h" #include "core/or/cell_st.h" #include "core/or/cell_queue_st.h" -#include "core/or/extend_info_st.h" #include "core/or/or_connection_st.h" #include "core/or/or_handshake_certs_st.h" #include "core/or/or_handshake_state_st.h" @@ -702,9 +702,9 @@ channel_tls_matches_extend_info_method(channel_t *chan, return 0; } - return (tor_addr_eq(&(extend_info->addr), - &(TO_CONN(tlschan->conn)->addr)) && - (extend_info->port == TO_CONN(tlschan->conn)->port)); + return extend_info_has_orport(extend_info, + &TO_CONN(tlschan->conn)->addr, + TO_CONN(tlschan->conn)->port); } /** |