Commit 0d2e27b8 authored by Kuniyuki Iwashima's avatar Kuniyuki Iwashima Committed by Jakub Kicinski

ipv6: exthdrs: Replace pskb_pull() with skb_pull() in ipv6_srh_rcv().

ipv6_rthdr_rcv() pulls these data

  - Segment Routing Header : 8
  - Hdr Ext Len            : skb_transport_header(skb)[1] << 3

needed by ipv6_srh_rcv(), so pskb_pull() in ipv6_srh_rcv() never
fails and can be replaced with skb_pull().
Signed-off-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 6facbca5
...@@ -402,11 +402,7 @@ static int ipv6_srh_rcv(struct sk_buff *skb) ...@@ -402,11 +402,7 @@ static int ipv6_srh_rcv(struct sk_buff *skb)
skb_postpull_rcsum(skb, skb_network_header(skb), skb_postpull_rcsum(skb, skb_network_header(skb),
skb_network_header_len(skb)); skb_network_header_len(skb));
skb_pull(skb, offset);
if (!pskb_pull(skb, offset)) {
kfree_skb(skb);
return -1;
}
skb_postpull_rcsum(skb, skb_transport_header(skb), skb_postpull_rcsum(skb, skb_transport_header(skb),
offset); offset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment