]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces/linux: make veth special
authorVincent Bernat <vincent@bernat.im>
Thu, 19 May 2016 21:36:24 +0000 (23:36 +0200)
committerVincent Bernat <vincent@bernat.im>
Thu, 19 May 2016 21:38:01 +0000 (23:38 +0200)
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".

NEWS
src/daemon/interfaces-linux.c

diff --git a/NEWS b/NEWS
index 8da7bcd57b70644dd443b888a2b28e0917a47ce6..ee2fa0d74997290e3fd0a3c9b69102a70c8b4d22 100644 (file)
--- 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:
index 340b9e8db9a6c1136175b49e069c4021f83655f2..6ac428f878ccb15afddb95d6f8c656fbfdcf7828 100644 (file)
@@ -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;