bonding: Return pointer to data after pull on skb
Subsystems (3)
PATCH 1/1 bonding: Return pointer to data after pull on skb
Since 429e3d123d9a ("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).
--- drivers/net/bonding/bond_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +1 -1
@@ -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 ; }
Signature · 6 lines
2.35.3 -- Jiri Wiesner SUSE Labs
Quoted 6 lines · Jiri Wiesner
Since
429e3d123d9a("bonding: Fix extraction of ports from the packet headers"), header offsets used to compute a hash inbond_xmit_hash()are relative toskb->dataand notskb->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).
Quoted 27 lines
Fixes 429e3d123d9a ("bonding: Fix extraction of ports from the packet headers")Signed-off-by Jiri Wiesner <[email protected]>---
drivers/net/bonding/bond_main.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/bonding/bond_main.c +1
-1@@ -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 ; }Signature · 6 lines
2.35.3 -- Jiri Wiesner SUSE Labs
Quoted 9 lines · Tue, Oct 10, 2023 at 06:39:33PM CEST, [email protected] wrote:
Since
429e3d123d9a("bonding: Fix extraction of ports from the packet headers"), header offsets used to compute a hash inbond_xmit_hash()are relative toskb->dataand notskb->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 429e3d123d9a ("bonding: Fix extraction of ports from the packet headers")Signed-off-by Jiri Wiesner <[email protected]>
This patch was applied to netdev/net.git (main) by David S. Miller <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <[email protected]>:
Quoted 8 lines · On Tue, 10 Oct 2023 18:39:33 +0200 you wrote:
Since
429e3d123d9a("bonding: Fix extraction of ports from the packet headers"), header offsets used to compute a hash inbond_xmit_hash()are relative toskb->dataand notskb->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).[...]
Here is the summary with links:
- [net] bonding: Return pointer to data after pull on skb
https://git.kernel.org/netdev/net/c/d93f3f992780
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html