Merge remote-tracking branch 'origin/maint-0.2.4'

This commit is contained in:
Nick Mathewson 2013-10-08 16:47:49 -04:00
commit 9de456a303
2 changed files with 6 additions and 0 deletions

4
changes/bug9904 Normal file
View File

@ -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".

View File

@ -1188,6 +1188,8 @@ get_interface_addresses_raw(int severity)
result = smartlist_new(); result = smartlist_new();
for (i = ifa; i; i = i->ifa_next) { for (i = ifa; i; i = i->ifa_next) {
tor_addr_t tmp; tor_addr_t tmp;
if ((i->ifa_flags & (IFF_UP | IFF_RUNNING)) != (IFF_UP | IFF_RUNNING))
continue;
if (!i->ifa_addr) if (!i->ifa_addr)
continue; continue;
if (i->ifa_addr->sa_family != AF_INET && if (i->ifa_addr->sa_family != AF_INET &&