From 2f4ff3072b954752ad53254a0c624ac5a46e2f89 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 28 Nov 2018 14:56:47 +0100 Subject: [PATCH] interfaces: remove specific handling for bonds except with --enable-oldies Starting from Linux 4.19, LLDP packets are transmitted back to the bond devices and it seems the original interface is lost in the process. Therefore, packets are duplicated to both members. Upstream commit is: commit 6a9e461f6fe4434e6172304b69774daff9a3ac4c Author: Mahesh Bandewar Date: Mon Sep 24 14:39:42 2018 -0700 bonding: pass link-local packets to bonding master also. Commit b89f04c61efe ("bonding: deliver link-local packets with skb->dev set to link that packets arrived on") changed the behavior of how link-local-multicast packets are processed. The change in the behavior broke some legacy use cases where these packets are expected to arrive on bonding master device also. This patch passes the packet to the stack with the link it arrived on as well as passes to the bonding-master device to preserve the legacy use case. Fixes: b89f04c61efe ("bonding: deliver link-local packets with skb->dev set to link that packets arrived on") Reported-by: Michal Soltys Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller The code to handle bond devices is not needed since Linux 2.6.27. Therefore, move it to the `--enable-oldies` option. Fix #306. --- NEWS | 3 +++ src/daemon/interfaces-linux.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 96f96acf..fdd7b1da 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ lldpd (1.0.2) CAP_NET_ADMIN and CAP_DAC_OVERRIDE capabilities. + Support for CDP PD PoE (with negotiation). Thanks to Gustav Wiklander. + + Move support for bonded devices on Linux < 2.6.27 into the + `--enable-oldies` option. This avoids duplicate packets + starting from Linux 4.19. lldpd (1.0.1) * Fix: diff --git a/src/daemon/interfaces-linux.c b/src/daemon/interfaces-linux.c index 18ecabfe..dff32190 100644 --- a/src/daemon/interfaces-linux.c +++ b/src/daemon/interfaces-linux.c @@ -671,6 +671,7 @@ iflinux_macphy(struct lldpd *cfg, struct lldpd_hardware *hardware) #endif /* ENABLE_DOT3 */ +#ifdef ENABLE_OLDIES struct bond_master { char name[IFNAMSIZ]; int index; @@ -847,6 +848,7 @@ iflinux_handle_bond(struct lldpd *cfg, struct interfaces_device_list *interfaces hardware->h_mtu = iface->mtu ? iface->mtu : 1500; } } +#endif /* Query each interface to get the appropriate driver */ static void @@ -1032,7 +1034,9 @@ interfaces_update(struct lldpd *cfg) iflinux_add_physical(cfg, interfaces); interfaces_helper_whitelist(cfg, interfaces); +#ifdef ENABLE_OLDIES iflinux_handle_bond(cfg, interfaces); +#endif interfaces_helper_physical(cfg, interfaces, ð_ops, iflinux_eth_init); -- 2.39.5