ipv6: exthdrs: Reload hdr only when needed in ipv6_srh_rcv().

We need not reload hdr in ipv6_srh_rcv() unless we call
pskb_expand_head().

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Kuniyuki Iwashima 2023-06-14 16:01:06 -07:00 committed by Jakub Kicinski
parent 0d2e27b858
commit b83d50f431

View File

@ -440,9 +440,9 @@ looped_back:
kfree_skb(skb);
return -1;
}
}
hdr = (struct ipv6_sr_hdr *)skb_transport_header(skb);
hdr = (struct ipv6_sr_hdr *)skb_transport_header(skb);
}
hdr->segments_left--;
addr = hdr->segments + hdr->segments_left;