From: Vincent Bernat Date: Sun, 3 Feb 2013 08:38:19 +0000 (+0100) Subject: interfaces: whitelist an interface before being checking lower X-Git-Tag: 0.7.2~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=981ee4fec9fb45dac7c84bd02d39bfb349ff65ef;p=thirdparty%2Flldpd.git 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. --- 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) {