diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-12-16 11:20:59 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-16 11:20:59 -0500 |
commit | 2cee38f76a46860e2fb29fbd95ba36b332aa38c6 (patch) | |
tree | 3b2cbaeff1472c8d23c18f3e88bc4735bbb22bcc /src/common/address.c | |
parent | b310929ee36f0a88389dca53124506115c850c3b (diff) | |
parent | 20292ec4974b777d430e7962cc38349c5f82b220 (diff) | |
download | tor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.tar.gz tor-2cee38f76a46860e2fb29fbd95ba36b332aa38c6.zip |
Merge branch 'prop271_030_v1_squashed'
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c index fa6630ef92..c89e8797c6 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -2122,3 +2122,11 @@ tor_addr_port_new(const tor_addr_t *addr, uint16_t port) return ap; } +/** Return true iff <a>a</b> and <b>b</b> are the same address and port */ +int +tor_addr_port_eq(const tor_addr_port_t *a, + const tor_addr_port_t *b) +{ + return tor_addr_eq(&a->addr, &b->addr) && a->port == b->port; +} + |