]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: restore bridge and bond detection without netlink
authorVincent Bernat <vincent@bernat.im>
Fri, 25 Sep 2015 09:20:56 +0000 (11:20 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 25 Sep 2015 09:20:56 +0000 (11:20 +0200)
With 2.6.32, it's not possible to use netlink for that.

NEWS
src/daemon/interfaces-linux.c

diff --git a/NEWS b/NEWS
index e94addad7053a4e155a71382ddab872b08e5765a..0ed2620dffa8f00c5dd27d94ca119c104aafbf73 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,11 @@
+lldpd (0.7.18)
+  * Fix:
+    + Restore ability to detect bridge and bonds without
+      netlink. Linux kernels prior to 2.6.39 don't have this
+      information available with netlink.
+  * Change:
+    + Remove old bridge code (the one using ioctl).
+
 lldpd (0.7.17)
   * Fix:
     + Fix an infinite loop when using veth on Linux 4.1+ kernels.
index 7b638c1a39c091b845a0610f2da5a37a686c434b..e550c79f0fd3ced29ff0270045bf6c2066aff434 100644 (file)
@@ -111,13 +111,11 @@ static struct lldpd_ops eth_ops = {
        .cleanup = iflinux_eth_close,
 };
 
-#ifdef ENABLE_OLDIES
 static int
 iflinux_is_bridge(struct lldpd *cfg,
     struct interfaces_device_list *interfaces,
     struct interfaces_device *iface)
 {
-#ifdef ENABLE_OLDIES
        struct interfaces_device *port;
        char path[SYSFS_PATH_MAX];
        int f;
@@ -147,9 +145,6 @@ iflinux_is_bridge(struct lldpd *cfg,
        }
 
        return 1;
-#else
-       return 0;
-#endif
 }
 
 static int
@@ -195,7 +190,6 @@ iflinux_is_bond(struct lldpd *cfg,
     struct interfaces_device_list *interfaces,
     struct interfaces_device *master)
 {
-#ifdef ENABLE_OLDIES
        /* Shortcut if we detect the new team driver. Upper and lower links
         * should already be set with netlink in this case.  */
        if (master->driver && !strcmp(master->driver, "team")) {
@@ -228,7 +222,6 @@ iflinux_is_bond(struct lldpd *cfg,
                }
                return 1;
        }
-#endif
        return 0;
 }