ipv6: exthdrs: Remove redundant skb_headlen() check in ip6_parse_tlv().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 14 Jun 2023 23:01:07 +0000 (16:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Mon, 19 Jun 2023 18:32:58 +0000 (11:32 -0700)
commit6db5dd2bf4817a415daaf6a0226beadef1473d30
treee283160f99e035747553a7a7baba0a7bbfeda76d
parentb83d50f43165e8c21d580f40c57d8f6fe85adb59
ipv6: exthdrs: Remove redundant skb_headlen() check in ip6_parse_tlv().

ipv6_destopt_rcv() and ipv6_parse_hopopts() pulls these data

  - Hop-by-Hop/Destination Options Header : 8
  - Hdr Ext Len                           : skb_transport_header(skb)[1] << 3

and calls ip6_parse_tlv(), so it need not check if skb_headlen() is less
than skb_transport_offset(skb) + (skb_transport_header(skb)[1] << 3).

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/exthdrs.c