diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2023-06-14 16:01:06 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-19 11:32:58 -0700 |
commit | b83d50f43165e8c21d580f40c57d8f6fe85adb59 (patch) | |
tree | 4011e32105ee75f41fae08be99d0fac223112acb | |
parent | 0d2e27b858503472f8ed66910498205824b02f8a (diff) | |
download | linux-stable-b83d50f43165e8c21d580f40c57d8f6fe85adb59.tar.gz linux-stable-b83d50f43165e8c21d580f40c57d8f6fe85adb59.tar.bz2 linux-stable-b83d50f43165e8c21d580f40c57d8f6fe85adb59.zip |
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>
-rw-r--r-- | net/ipv6/exthdrs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index e62e26ac99ef..dd23531387e3 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -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; |