Commit 429e3d12 authored by Moshe Tal's avatar Moshe Tal Committed by David S. Miller

bonding: Fix extraction of ports from the packet headers

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: a815bde5 ("net, bonding: Refactor bond_xmit_hash for use with
xdp_buff")
Reviewed-by: default avatarJussi Maki <joamaki@gmail.com>
Reviewed-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Reviewed-by: default avatarGal Pressman <gal@nvidia.com>
Signed-off-by: default avatarMoshe Tal <moshet@nvidia.com>
Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 56d99e81
......@@ -3874,8 +3874,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));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment