mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 21:33:52 +00:00
bonding: Fix extraction of ports from the packet headers
commit429e3d123d
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:a815bde56b
("net, bonding: Refactor bond_xmit_hash for use with xdp_buff") Reviewed-by: Jussi Maki <joamaki@gmail.com> Reviewed-by: Saeed Mahameed <saeedm@nvidia.com> Reviewed-by: Gal Pressman <gal@nvidia.com> Signed-off-by: Moshe Tal <moshet@nvidia.com> Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
52b66f8189
commit
8d8f479e08
1 changed files with 2 additions and 2 deletions
|
@ -3872,8 +3872,8 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
|
|||
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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue