core: don't assume the loopback interface is called "lo"

I did a "ip link set lo name yolo" and now my NetworkManager triggers an
assertion failure. :( Nevertheless, the loopback interface is always ifindex=1.

(cherry picked from commit 36f7669a4c)
This commit is contained in:
Lubomir Rintel 2015-06-01 17:28:13 +00:00
parent 9ce3e5e76e
commit 93409da4dc

View file

@ -512,7 +512,7 @@ main (int argc, char *argv[])
* physical interfaces.
*/
nm_log_dbg (LOGD_CORE, "setting up local loopback");
nm_platform_link_set_up (nm_platform_link_get_ifindex ("lo"));
nm_platform_link_set_up (1);
success = TRUE;