diff --git a/changes/bug9904 b/changes/bug9904 new file mode 100644 index 0000000000000000000000000000000000000000..eec4144cce58398ef345af03ad6ea0a420a0b423 --- /dev/null +++ b/changes/bug9904 @@ -0,0 +1,4 @@ + o Minor bugfixes: + - When examining list of network interfaces to find our address, do + not consider non-running or disabled network interfaces. Fixes bug + 9904; bugfix on 0.2.3.11-alpha. Patch from "hantwister". diff --git a/src/common/address.c b/src/common/address.c index 945e5e79bdf96b5e09557b10ea857a955b28ddd1..b9f2d931549ae483c10fc3ec26fc23f7a7865362 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1188,6 +1188,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 &&