summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-07-29 01:41:24 +0200
committerDaniel Mack <daniel@zonque.org>2015-07-29 20:30:50 +0200
commitbe0c13707dbbc08fb842dbf1cfe162d8cc8cb479 (patch)
tree39a4393a78d5788249856ee9bd9645aaae96cd33 /src/network
parent79ac8ba9735b53fb805bdc3f6f9edeccf3985a43 (diff)
networkd-wait-online: only consider interfaces given on the commandline
If some interfaces are given on the commandline, ignore all others.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkd-wait-online-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/networkd-wait-online-manager.c b/src/network/networkd-wait-online-manager.c
index 7a557a728e..112d92a568 100644
--- a/src/network/networkd-wait-online-manager.c
+++ b/src/network/networkd-wait-online-manager.c
@@ -38,9 +38,15 @@ bool manager_ignore_link(Manager *m, Link *link) {
assert(m);
assert(link);
+ /* always ignore the loopback interface */
if (link->flags & IFF_LOOPBACK)
return true;
+ /* if interfaces are given on the command line, ignore all others */
+ if (m->interfaces && !strv_contains(m->interfaces, link->ifname))
+ return true;
+
+ /* ignore interfaces we explicitly are asked to ignore */
STRV_FOREACH(ignore, m->ignore)
if (fnmatch(*ignore, link->ifname, 0) == 0)
return true;