[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124184159.911513508@linuxfoundation.org>
Date: Mon, 24 Jan 2022 19:46:59 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jussi Maki <joamaki@...il.com>,
Saeed Mahameed <saeedm@...dia.com>,
Gal Pressman <gal@...dia.com>, Moshe Tal <moshet@...dia.com>,
Jay Vosburgh <jay.vosburgh@...onical.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH 5.16 1030/1039] bonding: Fix extraction of ports from the packet headers
From: Moshe Tal <moshet@...dia.com>
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 <joamaki@...il.com>
Reviewed-by: Saeed Mahameed <saeedm@...dia.com>
Reviewed-by: Gal Pressman <gal@...dia.com>
Signed-off-by: Moshe Tal <moshet@...dia.com>
Acked-by: Jay Vosburgh <jay.vosburgh@...onical.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
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));
}
Powered by blists - more mailing lists