GNOME Bugzilla – Bug 723048
'network-access' test can fail to guess interface index
Last modified: 2014-02-01 12:43:15 UTC
In gio/tests/network-address.c, the ‘find_ifname_and_index’ fails to determine an interface index when that interface has an index > 255. In our experience, that can happen when setting up separate network name spaces with CLONE_NEWNET: each time a new process is started, the "lo" interface (for example) would get an index incremented by one. This has caused occasional build failures with GNU Guix, which runs build processes in Linux containers with separate name spaces: https://lists.gnu.org/archive/html/guix-devel/2013-10/msg00173.html We work around it by specifically looking for "lo", and allowing indices greater than 255: http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/glib-tests-newnet.patch Ludo'.
You can't *just* look for "lo", because that will fail on Windows (and some old unixes had "lo0" rather than "lo" too, though I'm not sure if any current ones do...). Anyway, I fixed it to try "lo" first, and then fall back to probing up to 1024 if that fails.