Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3729201pxb; Mon, 24 Jan 2022 16:31:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzKfx0pXJAU8P0aqUjQkkvgJ4XCtWdwA61dsau/2H05mQHNkVtBDd1dU9riENNF+s/qAKG X-Received: by 2002:a17:902:e882:b0:14b:4faf:6f13 with SMTP id w2-20020a170902e88200b0014b4faf6f13mr6784560plg.19.1643070710275; Mon, 24 Jan 2022 16:31:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643070710; cv=none; d=google.com; s=arc-20160816; b=1Fr6+wtWZn7zvoMb31+ARBUryJywN7HcECe1rZqiuZzznF9XQ1c1pxKTWr8FZK9sZa 3E6IRi+PhUbVRZFJ9W6HElsrud7b2I3eQzQC3sXxdm1XnY39XZTUQflP+ugADM5PKX9Q YpPSrtTFBLLkDfcNrgwxxRircwO+gNcbg+ysAVtDY5SZx9JgX7TjVhw/GjQ6rOG7oqCz 71DWX0sQ81DhXhMSIWYX2TOT0sWrMfLK7k6Huu8+jQWKqP93IFywEB9WuQLuPp792C8w NByiYbfUDrH5NuXBzTnDCzJEMkvXYF+2kzBsPizm4lyoDFlcU7eVZWJeEcMsqLmPlKlQ VYWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=viUog11XquMbMnMm1icIiyQaGiQ+/OmkEWL7unrOiZM=; b=UDCOr6FKdlxRGnIHSmmdg00TtrtjtgzFCWDQTnNOc/F7ejLhoceujlbYkCcyhKb3Lw BoZWnXYFojK8UOli/X/nDULs2EqHbC8s01w8vtLPa/WMTUF7EF2ELObbdZV8yvLgd1pp 024jfof5dx2WTZHGthkQyjF+oDJPvaRxX5AVSEFW7PFGpPKG89L3amY2fGhNkwVvljB8 x4pwt8pA4iK0WvfdqevJg9o3wrKNThMcqwEtFiBJjYmtEJFnhGPBZuqwlkJA76BwGNHQ fuuF9//Ug7o1DtQun3GhWtU3A+j9urDKmenIQQgOWZ2Tri8vciZBKo5oKz0nVL3zUte3 NP4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hmpGdyrx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k15si18108456pga.737.2022.01.24.16.31.36; Mon, 24 Jan 2022 16:31:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hmpGdyrx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S3409769AbiAYA1W (ORCPT + 99 others); Mon, 24 Jan 2022 19:27:22 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:53904 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573325AbiAXVou (ORCPT ); Mon, 24 Jan 2022 16:44:50 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6D0E3B8105C; Mon, 24 Jan 2022 21:44:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FE1FC340E4; Mon, 24 Jan 2022 21:44:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643060687; bh=cMFAZwDQpgjABQ2Q/fX+54tfhOManCJbXO3VeKI8TMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hmpGdyrx9bwPeeVzRdkFfeYc6fkrVve81IzlTEa7Hy5PBq+16A0kyW5wwLL5wzeGC jJYZlerHqA9JCM2KwjZMGQYPCbMflSzYVOZf9cwyid91GSUtWh8FguePCJM+ocCTCU k4myKoZ23plLH9i8RJaXxfjV+mY/+g/fAS43laL4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jussi Maki , Saeed Mahameed , Gal Pressman , Moshe Tal , Jay Vosburgh , "David S. Miller" Subject: [PATCH 5.16 1030/1039] bonding: Fix extraction of ports from the packet headers Date: Mon, 24 Jan 2022 19:46:59 +0100 Message-Id: <20220124184159.911513508@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Moshe Tal commit 429e3d123d9a50cc9882402e40e0ac912d88cfcf upstream. Wrong hash sends single stream to multiple output interfaces. The offset calculation was relative to skb->head, fix it to be relative to skb->data. Fixes: a815bde56b15 ("net, bonding: Refactor bond_xmit_hash for use with xdp_buff") Reviewed-by: Jussi Maki Reviewed-by: Saeed Mahameed Reviewed-by: Gal Pressman Signed-off-by: Moshe Tal Acked-by: Jay Vosburgh Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/bonding/bond_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -3872,8 +3872,8 @@ u32 bond_xmit_hash(struct bonding *bond, skb->l4_hash) return skb->hash; - return __bond_xmit_hash(bond, skb, skb->head, skb->protocol, - skb->mac_header, skb->network_header, + return __bond_xmit_hash(bond, skb, skb->data, skb->protocol, + skb_mac_offset(skb), skb_network_offset(skb), skb_headlen(skb)); }