Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ncardwell@google.com
Cc: netdev@vger.kernel.org, edumazet@google.com
Subject: Re: [PATCH net] inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets
Date: Mon, 13 Jan 2014 22:36:09 -0800 (PST)	[thread overview]
Message-ID: <20140113.223609.740104415435674658.davem@davemloft.net> (raw)
In-Reply-To: <1389386085-22659-1-git-send-email-ncardwell@google.com>

From: Neal Cardwell <ncardwell@google.com>
Date: Fri, 10 Jan 2014 15:34:45 -0500

> Fix inet_diag_dump_icsk() to reflect the fact that both TCP_TIME_WAIT
> and TCP_FIN_WAIT2 connections are represented by inet_timewait_sock
> (not just TIME_WAIT), and for such sockets the tw_substate field holds
> the real state, which can be either TCP_TIME_WAIT or TCP_FIN_WAIT2.
> 
> This brings the inet_diag state-matching code in line with the field
> it uses to populate idiag_state. This is also analogous to the info
> exported in /proc/net/tcp, where get_tcp4_sock() exports sk->sk_state
> and get_timewait4_sock() exports tw->tw_substate.
> 
> Before fixing this, (a) neither "ss -nemoi" nor "ss -nemoi state
> fin-wait-2" would return a socket in TCP_FIN_WAIT2; and (b) "ss -nemoi
> state time-wait" would also return sockets in state TCP_FIN_WAIT2.
> 
> This is an old bug that predates 05dbc7b ("tcp/dccp: remove twchain").
> 
> Signed-off-by: Neal Cardwell <ncardwell@google.com>

Applied, thanks.

      parent reply	other threads:[~2014-01-14  6:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 20:34 [PATCH net] inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets Neal Cardwell
2014-01-10 21:32 ` Eric Dumazet
2014-01-14  6:36 ` David Miller [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=20140113.223609.740104415435674658.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ncardwell@google.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