[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20110524.011212.127532825045335987.davem@davemloft.net>
Date: Tue, 24 May 2011 01:12:12 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: steffen.klassert@...unet.com
Cc: bhutchings@...arflare.com, eric.dumazet@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] ipv6: xfrm6: fix dubious code
From: Steffen Klassert <steffen.klassert@...unet.com>
Date: Tue, 24 May 2011 07:02:42 +0200
> I think we can return the value directly like ipv4 does it. xfrm6_rcv_spi()
> returns the return value of xfrm_input() which returns 0 in any case.
Indeed, works for me:
--------------------
ipv6: Fix return of xfrm6_tunnel_rcv()
Like ipv4, just return xfrm6_rcv_spi()'s return value directly.
Signed-off-by: David S. Miller <davem@...emloft.net>
---
net/ipv6/xfrm6_tunnel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index a6770a0..4fe1db1 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -241,7 +241,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb)
__be32 spi;
spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&iph->saddr);
- return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi) > 0 ? : 0;
+ return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi);
}
static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists