RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1229355 - ss -an shows only tcp sockets
Summary: ss -an shows only tcp sockets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: iproute
Version: 6.7
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Phil Sutter
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On:
Blocks: 1275424
TreeView+ depends on / blocked
 
Reported: 2015-06-08 14:15 UTC by Jaroslav Aster
Modified: 2016-05-11 00:19 UTC (History)
4 users (show)

Fixed In Version: iproute-2.6.32-46.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1291818 (view as bug list)
Environment:
Last Closed: 2016-05-11 00:19:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0895 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2016-05-10 22:50:11 UTC

Description Jaroslav Aster 2015-06-08 14:15:07 UTC
Description of problem:

ss -an shows only tcp sockets, but documentation says that all sockets should be shown.

Version-Release number of selected component (if applicable):

iproute-2.6.32-45.el6

How reproducible:

100%

Steps to Reproduce:

# ss -an
# ss -ant
# ss -anu

Actual results:

ss -an showes the same result as ss -ant.

Expected results:

ss -an shows all sockets, ss -ant shows all tcp sockets and ss -anu shows all udp sockets and so on.

Comment 1 Phil Sutter 2015-10-15 19:34:36 UTC
This is a documentation issue. In RHEL6's iproute code base, with no options given ss prints only TCP sockets. Option -a does not request all socket families, but all socket states (i.e., listening as well as connected, etc.).

The inconsistency has been fixed by the following upstream commit:

commit 5d8056357a032131057462fadb77c62cab6b2f0f
Author: Petr Sabata <psabata>
Date:   Mon Nov 29 14:00:37 2010 +0100

    ss(8) improvements by Jiri Popelka <jpopelka>

Comment 3 Marek Marusic 2015-11-16 08:26:52 UTC
Hello, is this really a documentation bug?
When you try to run 'ss -an' on RHEL7.2 it outputs upd sockets too.
I think the behaviour of this command shouldn't be so different on RHEL6 and RHEL7.

Comment 4 Phil Sutter 2015-11-16 15:16:31 UTC
Hi Marek,

(In reply to Marek Marusic from comment #3)
> Hello, is this really a documentation bug?
> When you try to run 'ss -an' on RHEL7.2 it outputs upd sockets too.
> I think the behaviour of this command shouldn't be so different on RHEL6 and
> RHEL7.

Yes, the behaviour has changed in between base release for RHEL6 and upstream. For RHEL7 there was an update of the whole ss code base at some point. Deciding between bug and feature is not trivial for me here. Basically I see two relevant commits, first one being the quoted one above which adjusts the documentation to point out that ss by default lists only TCP sockets. The second one is this (if I'm not mistaken):

commit 9db7bf15e22b6a1b8bc09c4a1e29571cbca55c94
Author: Vadim Kochan <vadim4j>
Date:   Sun Jan 4 22:18:40 2015 +0200

    ss: Filtering logic changing, with fixes
    
    This patch fixes some filtering combinations issues which does not
    work on the 'master' version:
    
        $ ss -4
        shows inet & unix sockets, instead of only inet sockets
    
        $ ss -u
        needs to specify 'state closed'
    
        $ ss src unix:*X11*
        needs to specify '-x' shortcut for UNIX family
    
        $ ss -A all
        shows only sockets with established states
    
    There might some other issues which was not observed.
    
    Also changed logic for calculating families, socket types and
    states filtering. I think that this version is a little simpler
    one. Now there are 2 predefined default tables which describes
    the following maping:
    
        family  -> (states, dbs)
        db      -> (states, families)
    
    Signed-off-by: Vadim Kochan <vadim4j>

As you see, this is fairly new and changes more things than just the default filters. In my point of view, this is rather an enhancement than bug fix (not least since it touches ~300 lines of code).

Given the state RHEL6 is in now, I'd really prefer to just fix the documentation to reflect the actual behaviour instead of taking the risk of this rather extensive backport.

Cheers, Phil

Comment 8 errata-xmlrpc 2016-05-11 00:19:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0895.html


Note You need to log in before you can comment on or make changes to this bug.