From: Vincent Bernat Date: Fri, 25 Sep 2015 09:20:56 +0000 (+0200) Subject: interfaces: restore bridge and bond detection without netlink X-Git-Tag: 0.7.18~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9df0eebfaacbc7b0da0bd627388754657419008e;p=thirdparty%2Flldpd.git interfaces: restore bridge and bond detection without netlink With 2.6.32, it's not possible to use netlink for that. --- diff --git a/NEWS b/NEWS index e94addad..0ed2620d 100644 --- 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. diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 7b638c1a..e550c79f 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -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; }