Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 483058 - sys-apps/net-tools - netstat missing sctp support for established associations
Summary: sys-apps/net-tools - netstat missing sctp support for established associations
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on: 526040
Blocks:
  Show dependency tree
 
Reported: 2013-08-30 19:59 UTC by Andreas Steinmetz
Modified: 2015-08-29 06:35 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Steinmetz 2013-08-30 19:59:47 UTC
netstat doesn't show sctp associations but prints errors instead.

Instead it prints something like:

SCTP error in line: 1

There seems to be some fix for this floating around, according to https://bugzilla.redhat.com/show_bug.cgi?id=826676 though I can't seem to find a proper patch without digging into RH SRPMs.
Comment 1 SpanKY gentoo-dev 2013-10-15 16:36:58 UTC
upstream has added/extended support, so probably just updating the snapshot should be sufficient

could you do a git clone and double check ?
https://sourceforge.net/p/net-tools/code/ci/master/tree/
Comment 2 Andreas Steinmetz 2013-11-04 12:35:11 UTC
Got around to test upstream git just today (net-tools-code-f919c51b2467ca0b59841b265415ee5765fd25ca). Sadly it seems the problem stays as it is:

SCTP error in line: 1
SCTP error in line: 2

Looking a bit closer in netstat.c the sctp related routines are sctp_do_ept and sctp_do_assoc.

While sctp_do_ept seems to work for IPv4 it is most probably broken for IPv6.

sctp_do_assoc doesn't even match the format of /proc/net/sctp/assocs for IPv4 and there is seemingly no IPv6 support.

Though I could cobble something together for my use case (refrain to do so) it will require people with deeper knowledge of the formatting of the files in /proc/net/sctp with respect to IPv4, IPv6, multiple address associations, etc. to actually update netstat.c properly.
Comment 3 Joshua Kinard gentoo-dev 2014-09-08 01:46:55 UTC
This should be fixed in net-tools-1.60_p20130513023548-r1.  I copied a series of patches from Fedora and re-synched them to our latest ebuild, and netstat -anSp now shows IPv4 and IPv6 SCTP associations properly.  One odd bit is if the field is 0 or not actually connected to anything, then the field will be blank instead.
Comment 4 SpanKY gentoo-dev 2014-10-19 04:24:22 UTC
you'll need to retest with net-tools-1.60_p20141019041918
Comment 5 Joshua Kinard gentoo-dev 2014-10-20 11:37:27 UTC
Re-opening...
Comment 6 SpanKY gentoo-dev 2015-08-26 04:02:19 UTC
please post a test case for creating SCTP connections that i can run
Comment 7 Andreas Steinmetz 2015-08-26 07:45:54 UTC
1. Emerge net-misc/openssh with USE="sctp"
2. Configure "Transport all" in /etc/ssh/sshd_config
3. Connect to sshd using: ssh -o "Transport sctp" ...

Sample result with idle sshd waiting for connection:

$ netstat -na | grep -i sctp
SCTP error in line: 1
sctp       0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

Thus SCTP IPv6 listen is already not printed properly.