From patchwork Mon Jan 7 16:29:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Soltys X-Patchwork-Id: 1021403 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ziu.info Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43YLTZ4t55z9sBn for ; Tue, 8 Jan 2019 03:30:10 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729101AbfAGQaJ (ORCPT ); Mon, 7 Jan 2019 11:30:09 -0500 Received: from drutsystem.com ([84.10.39.251]:59632 "EHLO drutsystem.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726963AbfAGQaJ (ORCPT ); Mon, 7 Jan 2019 11:30:09 -0500 Received: from hakai.touk.pl (hosta.touk.pl [212.180.179.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by drutsystem.com (Postfix) with ESMTPSA id 3374E62F667; Mon, 7 Jan 2019 17:30:00 +0100 (CET) From: Michal Soltys To: "David S . Miller" Cc: Michal Soltys , netdev@vger.kernel.org, Jay Vosburgh , Vincent Bernat , Mahesh Bandewar , Chonggang Li Subject: [PATCH net 1/1] bonding: fix PACKET_ORIGDEV regression on bonding masters Date: Mon, 7 Jan 2019 17:29:46 +0100 Message-Id: <20190107162946.13072-2-soltys@ziu.info> In-Reply-To: <20190107162946.13072-1-soltys@ziu.info> References: <20190107162946.13072-1-soltys@ziu.info> MIME-Version: 1.0 X-MailScanner-ID: 3374E62F667.A7CBC X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-MailScanner-From: soltys@ziu.info X-Spam-Status: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch reverts: b89f04c61efe bonding: deliver link-local packets with skb->dev set to link that packets arrived on And its subsequent fixups: 6a9e461f6fe4 bonding: pass link-local packets to bonding master also. 0f3b914c9cfc bonding: fix warning message The intended functionality of the original patch (as explained by its author) has been available in the kernel since v2.6.21-350-g80feaacb8a64 via PACKET_ORIGDEV socket option. The patch also broke that feature, as it's now no longer possible to get the original incoming device. Quoting the report: > Unfortunately, this doesn't completely restore the previous > functionality as PACKET_ORIGDEV is broken for the copy: the original > interface is lost through the call to netif_rx(). A LLDP daemon > listening to the master interface won't get the original interface like > it was able to before 4.12. The patch reverts to pre-b89f04c61efe state, so: - both master and original (via PACKET_ORIGDEV) devices are available when listening on the master - original device is available when listening directly on one of its slaves Reported-by: Vincent Bernat Signed-off-by: Michal Soltys --- drivers/net/bonding/bond_main.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a9d597f28023..290235587a0e 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -1183,27 +1183,6 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb) } } - /* Link-local multicast packets should be passed to the - * stack on the link they arrive as well as pass them to the - * bond-master device. These packets are mostly usable when - * stack receives it with the link on which they arrive - * (e.g. LLDP) they also must be available on master. Some of - * the use cases include (but are not limited to): LLDP agents - * that must be able to operate both on enslaved interfaces as - * well as on bonds themselves; linux bridges that must be able - * to process/pass BPDUs from attached bonds when any kind of - * STP version is enabled on the network. - */ - if (is_link_local_ether_addr(eth_hdr(skb)->h_dest)) { - struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); - - if (nskb) { - nskb->dev = bond->dev; - nskb->queue_mapping = 0; - netif_rx(nskb); - } - return RX_HANDLER_PASS; - } if (bond_should_deliver_exact_match(skb, slave, bond)) return RX_HANDLER_EXACT;