diff options
author | Nick Mathewson <nickm@torproject.org> | 2020-06-04 10:33:36 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2020-06-04 10:33:36 -0400 |
commit | 2b98df3c7478b03c82f2d284dad18ba33fe8c41c (patch) | |
tree | 32dd47b691d022ba5d5c0add5995211c6983494d /src/lib | |
parent | 284e9459b8840bdf9865e756a0bb0e63e56bae77 (diff) | |
parent | 8b568b50a5054f5e94d7085682e717b4eab58ce5 (diff) | |
download | tor-2b98df3c7478b03c82f2d284dad18ba33fe8c41c.tar.gz tor-2b98df3c7478b03c82f2d284dad18ba33fe8c41c.zip |
Merge remote-tracking branch 'tor-github/pr/1910/head'
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/net/address.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/net/address.c b/src/lib/net/address.c index b8f5f37747..b09c9115c4 100644 --- a/src/lib/net/address.c +++ b/src/lib/net/address.c @@ -1694,11 +1694,15 @@ get_interface_address6,(int severity, sa_family_t family, tor_addr_t *addr)) * Ideally, we want the default route, see #12377 for details */ SMARTLIST_FOREACH_BEGIN(addrs, tor_addr_t *, a) { tor_addr_copy(addr, a); + const bool is_internal = tor_addr_is_internal(a, 0); rv = 0; + log_debug(LD_NET, "Found %s interface address '%s'", + (is_internal ? "internal" : "external"), fmt_addr(addr)); + /* If we found a non-internal address, declare success. Otherwise, * keep looking. */ - if (!tor_addr_is_internal(a, 0)) + if (!is_internal) break; } SMARTLIST_FOREACH_END(a); |