netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv4: remove redundant verification code
@ 2010-04-01  0:54 Hagen Paul Pfeifer
  2010-04-02  1:44 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Hagen Paul Pfeifer @ 2010-04-01  0:54 UTC (permalink / raw)
  To: netdev; +Cc: davem

The check if error signaling is wanted (inet->recverr != 0) is done by
the caller: raw.c:raw_err() and udp.c:__udp4_lib_err(), so there is no
need to check this condition again.

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
 net/ipv4/ip_sockglue.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 644dc43..f4b47ac 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -286,12 +286,8 @@ int ip_ra_control(struct sock *sk, unsigned char on,
 void ip_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
 		   __be16 port, u32 info, u8 *payload)
 {
-	struct inet_sock *inet = inet_sk(sk);
 	struct sock_exterr_skb *serr;
 
-	if (!inet->recverr)
-		return;
-
 	skb = skb_clone(skb, GFP_ATOMIC);
 	if (!skb)
 		return;
-- 
1.6.6.196.g1f735.dirty


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

* Re: [PATCH] ipv4: remove redundant verification code
  2010-04-01  0:54 [PATCH] ipv4: remove redundant verification code Hagen Paul Pfeifer
@ 2010-04-02  1:44 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-04-02  1:44 UTC (permalink / raw)
  To: hagen; +Cc: netdev

From: Hagen Paul Pfeifer <hagen@jauu.net>
Date: Thu,  1 Apr 2010 02:54:46 +0200

> The check if error signaling is wanted (inet->recverr != 0) is done by
> the caller: raw.c:raw_err() and udp.c:__udp4_lib_err(), so there is no
> need to check this condition again.
> 
> Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>

Applied.

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

end of thread, other threads:[~2010-04-02  1:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01  0:54 [PATCH] ipv4: remove redundant verification code Hagen Paul Pfeifer
2010-04-02  1:44 ` David Miller

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).