* [PATCH net] ipv6: sr: remove duplicate routing header type check
@ 2017-09-10 12:45 David Lebrun
2017-09-10 13:18 ` David Lebrun
0 siblings, 1 reply; 4+ messages in thread
From: David Lebrun @ 2017-09-10 12:45 UTC (permalink / raw)
To: netdev; +Cc: David Lebrun, David Lebrun
From: David Lebrun <dav.lebrun@gmail.com>
From: David Lebrun <dlebrun@google.com>
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: 5829d70b ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200")
Signed-off-by: David Lebrun <dlebrun@google.com>
---
net/ipv6/seg6_local.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index 7ff54db..825b8e0 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -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))
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] ipv6: sr: remove duplicate routing header type check
2017-09-10 12:45 David Lebrun
@ 2017-09-10 13:18 ` David Lebrun
0 siblings, 0 replies; 4+ messages in thread
From: David Lebrun @ 2017-09-10 13:18 UTC (permalink / raw)
To: netdev
Please ignore this one, resending with proper From lines.
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net] ipv6: sr: remove duplicate routing header type check
@ 2017-09-10 13:22 David Lebrun
2017-09-11 21:34 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: David Lebrun @ 2017-09-10 13:22 UTC (permalink / raw)
To: netdev
From: David Lebrun <dlebrun@google.com>
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: 5829d70b ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200")
Signed-off-by: David Lebrun <dlebrun@google.com>
---
net/ipv6/seg6_local.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/ipv6/seg6_local.c b/net/ipv6/seg6_local.c
index 7ff54db..825b8e0 100644
--- a/net/ipv6/seg6_local.c
+++ b/net/ipv6/seg6_local.c
@@ -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))
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] ipv6: sr: remove duplicate routing header type check
2017-09-10 13:22 [PATCH net] ipv6: sr: remove duplicate routing header type check David Lebrun
@ 2017-09-11 21:34 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-11 21:34 UTC (permalink / raw)
To: dav.lebrun; +Cc: netdev
From: David Lebrun <dav.lebrun@gmail.com>
Date: Sun, 10 Sep 2017 14:22:01 +0100
> From: David Lebrun <dlebrun@google.com>
>
> 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: 5829d70b ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200")
> Signed-off-by: David Lebrun <dlebrun@google.com>
Applied thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-11 21:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-10 13:22 [PATCH net] ipv6: sr: remove duplicate routing header type check David Lebrun
2017-09-11 21:34 ` David Miller
-- strict thread matches above, loose matches on Subject: below --
2017-09-10 12:45 David Lebrun
2017-09-10 13:18 ` David Lebrun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).