gio/tests/network-address: fix for systems with large ifindexes
authorDan Winship <danw@gnome.org>
Sat, 1 Feb 2014 12:37:07 +0000 (13:37 +0100)
committerDan Winship <danw@gnome.org>
Sat, 1 Feb 2014 12:37:07 +0000 (13:37 +0100)
commited2bb953301b47bf34ff9c76b5931285d8434654
tree26168dbf7e27a57143d0592fc72db09b01840605
parent76330899a1b0f8f8dea1912e7f24d73eb3adc1c0
gio/tests/network-address: fix for systems with large ifindexes

In some virtualization setups, ifindexes can end up becoming very
large, and so the existing code that assumes that *some* interface
must have an index less than 255 fails.

Fix this by explicitly looking for "lo" first. And then if that fails
(on Windows, or other systems where the loopback interface is not
called "lo"), try indexes up to 1024 rather than 255.

https://bugzilla.gnome.org/show_bug.cgi?id=723048
gio/tests/network-address.c