lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHo-OoyFbUiFJMHCGdd=cC9RwaXbccwgzhKp7mBTPiQGZz0NAQ@mail.gmail.com>
Date:	Sat, 19 Jan 2013 18:47:05 -0800
From:	Maciej Żenczykowski <zenczykowski@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Neal Cardwell <ncardwell@...gle.com>
Subject: Re: [PATCH] tcp: fix incorrect LOCKDROPPEDICMPS counter

Signed-off-by: Maciej Żenczykowski <maze@...gle.com>

On Sat, Jan 19, 2013 at 6:10 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> commit 563d34d057 (tcp: dont drop MTU reduction indications)
> added an error leading to incorrect accounting of
> LINUX_MIB_LOCKDROPPEDICMPS
>
> If socket is owned by the user, we want to increment
> this SNMP counter, unless the message is a
> (ICMP_DEST_UNREACH,ICMP_FRAG_NEEDED) one.
>
> Reported-by: Maciej Żenczykowski <maze@...gle.com>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Neal Cardwell <ncardwell@...gle.com>
> ---
>  net/ipv4/tcp_ipv4.c |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
> index 54139fa..70b09ef 100644
> --- a/net/ipv4/tcp_ipv4.c
> +++ b/net/ipv4/tcp_ipv4.c
> @@ -369,11 +369,10 @@ void tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
>          * We do take care of PMTU discovery (RFC1191) special case :
>          * we can receive locally generated ICMP messages while socket is held.
>          */
> -       if (sock_owned_by_user(sk) &&
> -           type != ICMP_DEST_UNREACH &&
> -           code != ICMP_FRAG_NEEDED)
> -               NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
> -
> +       if (sock_owned_by_user(sk)) {
> +               if (!(type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED))
> +                       NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS);
> +       }
>         if (sk->sk_state == TCP_CLOSE)
>                 goto out;
>
>
>
> --
> 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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ