Skip to content

Commit 429e3d1

Browse files
Moshe Taldavem330
authored andcommitted
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: a815bde ("net, bonding: Refactor bond_xmit_hash for use with xdp_buff") Reviewed-by: Jussi Maki <[email protected]> Reviewed-by: Saeed Mahameed <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Signed-off-by: Moshe Tal <[email protected]> Acked-by: Jay Vosburgh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 56d99e8 commit 429e3d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3874,8 +3874,8 @@ u32 bond_xmit_hash(struct bonding *bond, struct sk_buff *skb)
38743874
skb->l4_hash)
38753875
return skb->hash;
38763876

3877-
return __bond_xmit_hash(bond, skb, skb->head, skb->protocol,
3878-
skb->mac_header, skb->network_header,
3877+
return __bond_xmit_hash(bond, skb, skb->data, skb->protocol,
3878+
skb_mac_offset(skb), skb_network_offset(skb),
38793879
skb_headlen(skb));
38803880
}
38813881

0 commit comments

Comments
 (0)