Skip to content

Commit

Permalink
ipv6: sr: remove duplicate routing header type check
Browse files Browse the repository at this point in the history
As seg6_validate_srh() already checks that the Routing Header type is
correct, it is not necessary to do it again in get_srh().

Fixes: 5829d70 ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200")
Signed-off-by: David Lebrun <dlebrun@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Lebrun authored and David S. Miller committed Sep 11, 2017
1 parent 96c5508 commit 33e34e7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/ipv6/seg6_local.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ static struct ipv6_sr_hdr *get_srh(struct sk_buff *skb)

srh = (struct ipv6_sr_hdr *)(skb->data + srhoff);

/* make sure it's a Segment Routing header (Routing Type 4) */
if (srh->type != IPV6_SRCRT_TYPE_4)
return NULL;

len = (srh->hdrlen + 1) << 3;

if (!pskb_may_pull(skb, srhoff + len))
Expand Down

0 comments on commit 33e34e7

Please sign in to comment.