]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
interfaces: don't discard down interfaces
authorVincent Bernat <vincent@bernat.im>
Sat, 22 Aug 2015 21:03:27 +0000 (23:03 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 22 Aug 2015 21:03:27 +0000 (23:03 +0200)
This is an easy way to keep the configuration associated to those
interfaces. However, we still need to discard any neighbors in this
case.

NEWS
src/daemon/interfaces-bsd.c
src/daemon/interfaces-solaris.c
src/daemon/netlink.c

diff --git a/NEWS b/NEWS
index 8b814d8ed2801a06baa7d3d0df08514a2e176bfa..5fd05a2c547f6d6583e5864e5fad6de782236f72 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,7 @@
 lldpd (0.8.0)
   * Change:
+    + Don't discard down interfaces. Notably, this enables us to keep
+      their specific configuration if any.
     + For Linux, switch to libnl3. Be aware of the licensing issues in
       case of static linking.
     + Introduce the notion of default local port. New interfaces will
index f1ce36f44736cd535d2ed7ab8c2220dab22a5a6d..5b45c33aee1d18dfcbbf9ec73498ee1e8f207682 100644 (file)
@@ -427,11 +427,6 @@ ifbsd_extract(struct lldpd *cfg,
        struct interfaces_device *device = NULL;
        if (!ifaddr->ifa_name) return;
        if (!ifaddr->ifa_addr) return;
-       if (!((ifaddr->ifa_flags & IFF_UP) && (ifaddr->ifa_flags & IFF_RUNNING))) {
-               log_debug("interfaces",
-                   "skip %s: down", ifaddr->ifa_name);
-               return;
-       }
        switch (ifaddr->ifa_addr->sa_family) {
        case AF_LINK:
                log_debug("interfaces",
index cdb5d763487e1b3ac67ca5c49372afb011fc1552..0f9f5e5380102195170ac130eb24d0d9df12132e 100644 (file)
@@ -49,11 +49,6 @@ ifsolaris_extract(struct lldpd *cfg,
                return;
        }
        flags = lifrl.lifr_flags;
-       if (!((flags & IFF_UP) && (flags & IFF_RUNNING))) {
-               log_debug("interfaces",
-                   "skip %s: down", lifrl.lifr_name);
-               return;
-       }
 
        /* Index */
        if (ioctl(cfg->g_sock, SIOCGLIFINDEX, (caddr_t)&lifrl) < 0) {
index b8729bd34e4d109b76760bda668db631645502f1..06a370da24ecb4be3b0e8eeb00bc1bf174cea87e 100644 (file)
@@ -133,10 +133,6 @@ netlink_parse_link(struct rtnl_link *link)
        }
 
        unsigned int flags = rtnl_link_get_flags(link);
-       if (!((flags & IFF_UP) && (flags & IFF_RUNNING))) {
-               log_debug("netlink", "skip down interface %s", name);
-               return NULL;
-       }
        if (rtnl_link_get_arptype(link) != ARPHRD_ETHER) {
                log_debug("netlink", "skip non Ethernet interface %s", name);
                return NULL;