]> git.karo-electronics.de Git - karo-tx-linux.git/commit
bonding: fix l23 and l34 load balancing in forwarding path
authorEric Dumazet <edumazet@google.com>
Mon, 15 Apr 2013 17:03:24 +0000 (17:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 May 2013 16:46:17 +0000 (09:46 -0700)
commit4833451a2cc02dd929339753e84158232e1baccf
treea0e3238749fd481795c8b25755037b3f7e2ba784
parent52ce17463948a8558c5e1783693a4785da9b7f2a
bonding: fix l23 and l34 load balancing in forwarding path

[ Upstream commit 4394542ca4ec9f28c3c8405063d200b1e7c347d7 ]

Since commit 6b923cb7188d46 (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: Vitaly V. Bursov <vitalyb@telenet.dn.ua>
Signed-off-by: Eric 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: Vitaly V. Bursov <vitalyb@telenet.dn.ua>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_main.c