From f5a0a15ea37d4243ec0bc49d4ed50eed851bb619 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 11 Aug 2013 23:00:05 +0200 Subject: [PATCH] linux: add support for team devices --- NEWS | 1 + src/daemon/interfaces-linux.c | 6 ++++++ 2 files changed, 7 insertions(+) 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)); -- 2.39.5