From 981ee4fec9fb45dac7c84bd02d39bfb349ff65ef Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 3 Feb 2013 09:38:19 +0100 Subject: [PATCH] interfaces: whitelist an interface before being checking lower Some whitelisted interfaces, like dsa, have a lower interface in managed mode but we still want to advertise on it. Move the check for lower interface after whitelisting. --- src/daemon/interfaces-linux.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 3bfc2f0b..df8ec463 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -741,13 +741,6 @@ iflinux_add_physical(struct lldpd *cfg, continue; } - /* If the interface is linked to another one, skip it too. */ - if (iface->lower) { - log_debug("interfaces", "skip %s: there is a lower interface (%s)", - iface->name, iface->lower->name); - continue; - } - /* Check if the driver is whitelisted */ if (iface->driver) { for (rif = regular_interfaces; *rif; rif++) { @@ -761,6 +754,13 @@ iflinux_add_physical(struct lldpd *cfg, } } + /* If the interface is linked to another one, skip it too. */ + if (iface->lower) { + log_debug("interfaces", "skip %s: there is a lower interface (%s)", + iface->name, iface->lower->name); + continue; + } + /* Check queue len. If no queue, this usually means that this is not a "real" interface. */ if (iface->txqueue == 0) { -- 2.39.5