mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
bonding: Return pointer to data after pull on skb
commitd93f3f9927upstream. Since429e3d123d("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:429e3d123d("bonding: Fix extraction of ports from the packet headers") Signed-off-by: Jiri Wiesner <jwiesner@suse.de> Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
66982023d7
commit
0426d7bc17
@@ -3722,7 +3722,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user