All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: xfrm: xfrm_policy.c: remove some unnecessary cases in decode_session6
@ 2020-07-25 13:49 B K Karthik
  2020-07-27  9:36 ` Steffen Klassert
  0 siblings, 1 reply; 2+ messages in thread
From: B K Karthik @ 2020-07-25 13:49 UTC (permalink / raw)
  To: Steffen Klassert, Herbert Xu, David S. Miller, Jakub Kicinski,
	netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

remove some unnecessary cases in decode_session6

Signed-off-by: B K Karthik <bkkarthik@pesu.pes.edu>
---
 net/xfrm/xfrm_policy.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 19c5e0fa3f44..e1c988a89382 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -3449,10 +3449,6 @@ decode_session6(struct sk_buff *skb, struct flowi *fl, bool reverse)
 			fl6->flowi6_proto = nexthdr;
 			return;
 #endif
-		/* XXX Why are there these headers? */
-		case IPPROTO_AH:
-		case IPPROTO_ESP:
-		case IPPROTO_COMP:
 		default:
 			fl6->fl6_ipsec_spi = 0;
 			fl6->flowi6_proto = nexthdr;
-- 
2.20.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: xfrm: xfrm_policy.c: remove some unnecessary cases in decode_session6
  2020-07-25 13:49 [PATCH] net: xfrm: xfrm_policy.c: remove some unnecessary cases in decode_session6 B K Karthik
@ 2020-07-27  9:36 ` Steffen Klassert
  0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2020-07-27  9:36 UTC (permalink / raw)
  To: B K Karthik
  Cc: Herbert Xu, David S. Miller, Jakub Kicinski, netdev, linux-kernel

On Sat, Jul 25, 2020 at 07:19:49PM +0530, B K Karthik wrote:
> remove some unnecessary cases in decode_session6
> 
> Signed-off-by: B K Karthik <bkkarthik@pesu.pes.edu>
> ---
>  net/xfrm/xfrm_policy.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> index 19c5e0fa3f44..e1c988a89382 100644
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -3449,10 +3449,6 @@ decode_session6(struct sk_buff *skb, struct flowi *fl, bool reverse)
>  			fl6->flowi6_proto = nexthdr;
>  			return;
>  #endif
> -		/* XXX Why are there these headers? */
> -		case IPPROTO_AH:
> -		case IPPROTO_ESP:
> -		case IPPROTO_COMP:
>  		default:
>  			fl6->fl6_ipsec_spi = 0;
>  			fl6->flowi6_proto = nexthdr;

IPv4 implements spi parsing for these protocols, IPv6
does not do it. Before you just remove something, you
should think about which is the correct behaviour and
then do it for both, IPv4 and IPv6.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-27  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-25 13:49 [PATCH] net: xfrm: xfrm_policy.c: remove some unnecessary cases in decode_session6 B K Karthik
2020-07-27  9:36 ` Steffen Klassert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.