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

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
......@@ -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;
}
......
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