Skip to contentSkip to conversation

ipv6: exthdrs: refresh nh pointer after ipv6_hop_jumbo()

PATCH Applied Justin Iurman 3 participants 3 messages May 22 – May 25

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: exthdrs: refresh nh pointer after ipv6_hop_jumbo()

ipv6_hop_jumbo() calls pskb_trim_rcsum(), which can change skb pointers. Let's recompute nh pointer to make sure any change won't mess things up.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")
---
 net/ipv6/exthdrs.c | 2 ++
 1 file changed, 2 insertions(+)
net/ipv6/exthdrs.c +2 -0
index cf90f933ca1a..11915b75ece0 100644
@@ -184,6 +184,8 @@ static bool ip6_parse_tlv(bool hopbyhop,
 				case IPV6_TLV_JUMBO:
 					if (!ipv6_hop_jumbo(skb, off))
 						return false;
+
+					nh = skb_network_header(skb);
 					break;
 				case IPV6_TLV_CALIPSO:
 					if (!ipv6_hop_calipso(skb, off))
Signature · 1 line
2.34.1
#2 lore raw
In reply to Justin Iurman
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Fri, 22 May 2026 13:20:13 +0200 you wrote:

ipv6_hop_jumbo() calls pskb_trim_rcsum(), which can change skb pointers. Let's recompute nh pointer to make sure any change won't mess things up.

Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")

[...]

Here is the summary with links:
- [net] ipv6: exthdrs: refresh nh pointer after ipv6_hop_jumbo()

    https://git.kernel.org/netdev/net/c/d47548a36639

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html