Commit d93f3f99 authored by Jiri Wiesner's avatar Jiri Wiesner Committed by David S. Miller
Browse files

bonding: Return pointer to data after pull on skb



Since 429e3d12 ("bonding: Fix extraction of ports from the packet
headers"), header offsets used to compute a hash in bond_xmit_hash() are
relative to skb->data and not skb->head. If the tail of the header buffer
of an skb really needs to be advanced and the operation is successful, the
pointer to the data must be returned (and not a pointer to the head of the
buffer).

Fixes: 429e3d12 ("bonding: Fix extraction of ports from the packet headers")
Signed-off-by: default avatarJiri Wiesner <jwiesner@suse.de>
Acked-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e8c127b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4023,7 +4023,7 @@ static inline const void *bond_pull_data(struct sk_buff *skb,
	if (likely(n <= hlen))
		return data;
	else if (skb && likely(pskb_may_pull(skb, n)))
		return skb->head;
		return skb->data;

	return NULL;
}