Re: [CFR] Fix sockstat's handling of closed connections

From: Peter Pentchev (roam_at_ringlet.net)
Date: 08/25/04

  • Next message: Andre Oppermann: "Re: [CFR] Fix sockstat's handling of closed connections"
    Date: Wed, 25 Aug 2004 18:57:24 +0300
    To: Andre Oppermann <andre@freebsd.org>
    
    
    

    On Wed, Aug 25, 2004 at 05:48:38PM +0200, Andre Oppermann wrote:
    > Peter Pentchev wrote:
    [snip]
    > > Luckily, the fix is simple, or at least so it seems to me. It turns out
    > > that those connections have a xt_socket->xso_so set to NULL, and the
    > > false positive comes from sockstat's matching them to a similarly NULL
    > > xf_data members of 'kern.files'. What do people think about the
    > > following patch? I could commit it if nobody has any objections, but
    > > being a ports/doc committer, I would need an explicit approval to do
    > > that :)
    >
    > The fix looks good to me. It seems small enough so I think I can give
    > you the direct go-ahead to commit it. Could you also put a comment into
    > the sockstat man page describing that TCP connections in TIME_WAIT state
    > can be looked up with netstat?

    Thanks! I could easily fix the manpage, too, but is TIME_WAIT the only
    state when xt_socket->xso_so is null? Someone with better knowledge of
    the TCP/IP stack than me needs to either confirm that, or point out
    which of the CLOSED, CLOSE_WAIT, FIN_WAIT_1, CLOSING, and FIN_WAIT_2
    states also have a null xso_so - or is it just TIME_WAIT, because all
    the others still mean that the socket is still somewhat active?

    G'luck,
    Peter

    -- 
    Peter Pentchev	roam@ringlet.net    roam@cnsys.bg    roam@FreeBSD.org
    PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
    Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
    This sentence no verb.
    
    



  • Next message: Andre Oppermann: "Re: [CFR] Fix sockstat's handling of closed connections"

    Relevant Pages

    • cvs-src summaries misposted
      ... about the fact that I wouldn't be able to post the cvs-src summaries. ... Søren Schmidt added support to the ATA code for detaching PCI ATA ... As a follow-up to last week's commit of `ICC support for kernel building`, ... imported OpenSSL 0.9.7d, which includes the fix, to -CURRENT. ...
      (freebsd-current)
    • Re: [PATCH 25/39] merge common parts of uaccess.
      ... commit is rather large. ... I'm sure the fix is simple, but this bug shows a structural problem ... bisection result - instead of this too-broad bisection result. ... final step can be mechanic in that it unifies exactly the same content ...
      (Linux-Kernel)
    • Re: [PATCH] blk: missing add of padded bytes to io completion byte count
      ... I think that the block layer had better take care about it (fix ... But I plan to send a patch to revert it ... No this commit is a serious bug, and the only fix is like you suggested ...
      (Linux-Kernel)
    • [GIT PATCH] ACPI patches for 2.6.25-rc5
      ... ACPI: button: make real parent for input devices in device tree ... acer-wmi: Rename mail LED correctly & remove hardcoded colour ... Fix a duplicate log level ... commit 29ea5171cbd08a7ef37e543cbf02447033f0e289 ...
      (Linux-Kernel)
    • Re: [GIT PATCH] another tranche of SCSI updates for 2.6.26
      ... commit 064922a805ec7aadfafdd27aa6b4908d737c3c1d ... This patch adds more const keywords where appropriate. ... fix SLUB WARN_ON ... KVM: SVM: remove now obsolete FIXME comment ...
      (Linux-Kernel)