]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: bond listening was broken only for old kernels
authorVincent Bernat <vincent@bernat.im>
Sun, 26 Oct 2014 10:31:34 +0000 (11:31 +0100)
committerVincent Bernat <vincent@bernat.im>
Sun, 26 Oct 2014 10:31:34 +0000 (11:31 +0100)
With a recent kernel, we can listen to individual member. lldpd is still
listening on master to keep compatibility with older kernels and because
it is difficult to detect if the kernel gives us this ability or not. We
can't rely on version numbers as some kernels have backported
features (like 2.6.18 from RHEL 5).

NEWS
src/daemon/interfaces-linux.c

diff --git a/NEWS b/NEWS
index 6879aa7a62397da78ebea164601c78c93cecda89..a1af833a59a823c5858859113c06b5976343abee 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 lldpd (0.7.12)
   * Fix:
     + Don't complain when parsing a commented line.
-    + Fix listening on bond devices.
+    + Fix listening on bond devices for old kernels (< 2.6.27).
 
 lldpd (0.7.11)
   * Features:
index 85d8f986cecf3cbb298f4b7f34599e8b937c3469..df90455bd716076413a64b48cf6757120d3f1207 100644 (file)
@@ -446,6 +446,8 @@ iface_bond_init(struct lldpd *cfg, struct lldpd_hardware *hardware)
        interfaces_setup_multicast(cfg, hardware->h_ifname, 0);
 
        /* Then, we open a raw interface for the master */
+       log_debug("interfaces", "bonded device %s has master %s(%d)",
+           hardware->h_ifname, master->name, master->index);
        if ((fd = priv_iface_init(master->index, master->name)) == -1) {
                close(hardware->h_sendfd);
                return -1;