Skip to content
Commit 4394542c authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

bonding: fix l23 and l34 load balancing in forwarding path

Since commit 6b923cb7

 (bonding: support for IPv6 transmit hashing)
bonding doesn't properly hash traffic in forwarding setups.

Vitaly V. Bursov diagnosed that skb_network_header_len() returned 0 in
this case.

More generally, the transport header might not be in the skb head.

Use pskb_may_pull() & skb_header_pointer() to get it right, and use
proto_ports_offset() in bond_xmit_hash_policy_l34() to get support for
more protocols than TCP and UDP.

Reported-by: default avatarVitaly V. Bursov <vitalyb@telenet.dn.ua>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: John Eaglesham <linux@8192.net>
Tested-by: default avatarVitaly V. Bursov <vitalyb@telenet.dn.ua>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0c14e5ce
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