From b8abadedd3cb7ac3d140becf23d0a624e6405749 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 8 Oct 2013 16:46:29 -0400 Subject: When examining interfaces to find an address, discard non-up ones. Patch from "hantwister" on trac. Fixes bug #9904; bugfix on 0.2.3.11-alpha. --- src/common/address.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common') diff --git a/src/common/address.c b/src/common/address.c index 227b4fbaee..14a7b6bc96 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1187,6 +1187,8 @@ get_interface_addresses_raw(int severity) result = smartlist_new(); for (i = ifa; i; i = i->ifa_next) { tor_addr_t tmp; + if ((i->ifa_flags & (IFF_UP | IFF_RUNNING)) != (IFF_UP | IFF_RUNNING)) + continue; if (!i->ifa_addr) continue; if (i->ifa_addr->sa_family != AF_INET && -- cgit v1.2.3-54-g00ecf