From: Vincent Bernat Date: Thu, 19 May 2016 21:36:24 +0000 (+0200) Subject: interfaces/linux: make veth special X-Git-Tag: 0.9.3~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2958b9d48940c27ae29b4fb5a6900ac178519a89;p=thirdparty%2Flldpd.git interfaces/linux: make veth special veth is always a physical interface. However, it may be hard to detect because when they are created, lower interface for the first one is none and lower interface for the second one is the first one. Hence, no loop detected, hence the second one is not considered as a physical interface. This is madness, just whitelist "veth". --- diff --git a/NEWS b/NEWS index 8da7bcd5..ee2fa0d7 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ lldpd (0.9.3) + Always log to stderr (even in addition to syslog). * Fix: + `lldpcli -f {xml,json} watch` should work now. + + Consider `veth` interfaces as physical interfaces. lldpd (0.9.2) * Change: diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 340b9e8d..6ac428f8 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -734,7 +734,7 @@ iflinux_add_physical(struct lldpd *cfg, } /* If the interface is linked to another one, skip it too. */ - if (iface->lower) { + if (iface->lower && (!iface->driver || strcmp(iface->driver, "veth"))) { log_debug("interfaces", "skip %s: there is a lower interface (%s)", iface->name, iface->lower->name); continue;