From: Vincent Bernat Date: Sat, 22 Aug 2015 21:03:27 +0000 (+0200) Subject: interfaces: don't discard down interfaces X-Git-Tag: 0.8.0~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=36080cdcb7badf96941c9df5770372294af2cf28;p=thirdparty%2Flldpd.git interfaces: don't discard down interfaces This is an easy way to keep the configuration associated to those interfaces. However, we still need to discard any neighbors in this case. --- diff --git a/NEWS b/NEWS index 8b814d8e..5fd05a2c 100644 --- 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 diff --git a/src/daemon/interfaces-bsd.c b/src/daemon/interfaces-bsd.c index f1ce36f4..5b45c33a 100644 --- a/src/daemon/interfaces-bsd.c +++ b/src/daemon/interfaces-bsd.c @@ -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", diff --git a/src/daemon/interfaces-solaris.c b/src/daemon/interfaces-solaris.c index cdb5d763..0f9f5e53 100644 --- a/src/daemon/interfaces-solaris.c +++ b/src/daemon/interfaces-solaris.c @@ -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) { diff --git a/src/daemon/netlink.c b/src/daemon/netlink.c index b8729bd3..06a370da 100644 --- a/src/daemon/netlink.c +++ b/src/daemon/netlink.c @@ -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;