From: Vincent Bernat Date: Sun, 11 Aug 2013 21:00:05 +0000 (+0200) Subject: linux: add support for team devices X-Git-Tag: 0.7.7~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5a0a15ea37d4243ec0bc49d4ed50eed851bb619;p=thirdparty%2Flldpd.git linux: add support for team devices --- diff --git a/NEWS b/NEWS index 7963a3c9..76a56ab2 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ lldpd (0.7.7) + Use a locally administered MAC address or an arbitrary one instead of null MAC address for bond devices on Linux. This is configurable through `lldpcli`. + + Add support for "team" driver (alternative to bond devices). * Fixes: + Various bugs related to fixed point number handling (for coordinates in LLDP-MED) diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 63b96a66..f756d9a5 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -229,6 +229,12 @@ iflinux_is_bond(struct lldpd *cfg, struct interfaces_device_list *interfaces, struct interfaces_device *master) { + /* 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")) { + return 1; + } + struct ifreq ifr = {}; struct ifbond ifb = {}; strlcpy(ifr.ifr_name, master->name, sizeof(ifr.ifr_name));