netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vasiliy Kulikov <segoon@openwall.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Flavio Leitner <fbl@redhat.com>,
	David Miller <davem@davemloft.net>,
	Ivan Zahariev <famzah@icdsoft.com>,
	netdev@vger.kernel.org
Subject: Re: Unable to flush ICMP redirect routes in kernel 3.0+
Date: Thu, 17 Nov 2011 20:52:09 +0400	[thread overview]
Message-ID: <20111117165209.GA11813@albatros> (raw)
In-Reply-To: <1321540820.2751.47.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

On Thu, Nov 17, 2011 at 15:40 +0100, Eric Dumazet wrote:
> [PATCH] ping: dont increment ICMP_MIB_INERRORS
> 
> ping module incorrectly increments ICMP_MIB_INERRORS if feeded with a
> frame not belonging to its own sockets.
> 
> RFC 2011 states that ICMP_MIB_INERRORS should count "the number of ICMP
> messages which the entiry received but determined as having
> ICMP-specific errors (bad ICMP checksums, bad length, etc.)."
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Acked-by: Vasiliy Kulikov <segoon@openwall.com>

Thanks,

> ---
>  net/ipv4/ping.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
> index a06f73f..43d4c3b 100644
> --- a/net/ipv4/ping.c
> +++ b/net/ipv4/ping.c
> @@ -339,7 +339,6 @@ void ping_err(struct sk_buff *skb, u32 info)
>  	sk = ping_v4_lookup(net, iph->daddr, iph->saddr,
>  			    ntohs(icmph->un.echo.id), skb->dev->ifindex);
>  	if (sk == NULL) {
> -		ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS);
>  		pr_debug("no socket, dropping\n");
>  		return;	/* No socket for error */
>  	}
> @@ -679,7 +678,6 @@ static int ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
>  	pr_debug("ping_queue_rcv_skb(sk=%p,sk->num=%d,skb=%p)\n",
>  		inet_sk(sk), inet_sk(sk)->inet_num, skb);
>  	if (sock_queue_rcv_skb(sk, skb) < 0) {
> -		ICMP_INC_STATS_BH(sock_net(sk), ICMP_MIB_INERRORS);
>  		kfree_skb(skb);
>  		pr_debug("ping_queue_rcv_skb -> failed\n");
>  		return -1;
> 

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

      parent reply	other threads:[~2011-11-17 16:54 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 20:23 Unable to flush ICMP redirect routes in kernel 3.0+ Ivan Zahariev
2011-11-15 21:09 ` Eric Dumazet
2011-11-16 22:32   ` Ivan Zahariev
2011-11-17  0:33     ` Flavio Leitner
2011-11-17  8:10       ` Ivan Zahariev
2011-11-17 13:11         ` Flavio Leitner
2011-11-17 13:15           ` Eric Dumazet
2011-11-17 14:40             ` Eric Dumazet
2011-11-17 15:37               ` Flavio Leitner
2011-11-17 16:31                 ` Eric Dumazet
2011-11-17 16:40                   ` Flavio Leitner
2011-11-17 16:45                     ` Eric Dumazet
2011-11-17 16:57                       ` Eric Dumazet
2011-11-17 17:01                       ` Flavio Leitner
2011-11-17 17:18                         ` Eric Dumazet
2011-11-17 17:33                           ` Flavio Leitner
2011-11-17 17:38                           ` Eric Dumazet
2011-11-18 16:02                             ` Eric Dumazet
2011-11-18 16:30                               ` Flavio Leitner
2011-11-18 16:34                                 ` Eric Dumazet
2011-11-18 17:05                                   ` Flavio Leitner
2011-11-18 17:07                                     ` Eric Dumazet
2011-11-18 17:21                                       ` Flavio Leitner
2011-11-18 18:04                                         ` David Miller
2011-11-18 20:26                               ` David Miller
2011-11-17 16:52               ` Vasiliy Kulikov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111117165209.GA11813@albatros \
    --to=segoon@openwall.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=famzah@icdsoft.com \
    --cc=fbl@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).