ipv6: exthdrs: recompute network header pointer once
Subsystems (3)
PATCH 1/1 ipv6: exthdrs: recompute network header pointer once
In ip6_parse_tlv(), recompute the network header pointer once regardless of the option processed (Hbh or Dest), as missing recomputation for specific options has caused issues in the past.
--- net/ipv6/exthdrs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
net/ipv6/exthdrs.c +3 -6
@@ -178,14 +178,10 @@ static bool ip6_parse_tlv(bool hopbyhop,case IPV6_TLV_IOAM :if (!ipv6_hop_ioam (skb, off))return false; - - nh =skb_network_header (skb);break ;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))
@@ -203,8 +199,6 @@ static bool ip6_parse_tlv(bool hopbyhop,case IPV6_TLV_HAO :if (!ipv6_dest_hao (skb, off))return false; - - nh =skb_network_header (skb);break ;#endif default :
@@ -215,6 +209,9 @@ static bool ip6_parse_tlv(bool hopbyhop, } } padlen =0 ; + +/* recompute the network header pointer in case it has changed */ + nh =skb_network_header (skb); } off += optlen; len -= optlen;
Signature · 1 line
2.34.1
Quoted 5 lines · Justin Iurman
In
ip6_parse_tlv(), recompute the network header pointer once regardless of the option processed (Hbh or Dest), as missing recomputation for specific options has caused issues in the past.Signed-off-by Justin Iurman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Tue, 2 Jun 2026 23:30:33 +0200 you wrote:
In
ip6_parse_tlv(), recompute the network header pointer once regardless of the option processed (Hbh or Dest), as missing recomputation for specific options has caused issues in the past.Signed-off-by Justin Iurman <[email protected]>--- net/ipv6/exthdrs.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
Here is the summary with links:
- [net-next] ipv6: exthdrs: recompute network header pointer once
https://git.kernel.org/netdev/net-next/c/ee5aee77bcba
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html