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 1071910 - backport: ss: unix and netlink sockets are printed in inet mode
Summary: backport: ss: unix and netlink sockets are printed in inet mode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On: 1215006
Blocks: 1039625 1110700 1191021 1205796
TreeView+ depends on / blocked
 
Reported: 2014-03-03 12:52 UTC by Hubert Kario
Modified: 2015-11-19 14:41 UTC (History)
6 users (show)

Fixed In Version: iproute-3.10.0-24.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 14:41:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2117 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2015-11-19 11:35:06 UTC

Description Hubert Kario 2014-03-03 12:52:18 UTC
Description of problem:
When printing sockets setting the protocol to `inet` or `inet6` doesn't work, command outputs also unix connections

Version-Release number of selected component (if applicable):
iproute-3.10.0-13.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. ss -ln -f inet

Actual results:
# ss -ln -f inet
Netid  State      Recv-Q Send-Q                               Local Address:Port                                 Peer Address:Port 
nl     UNCONN     0      0                                                0:0                                                *     
nl     UNCONN     0      0                                                0:562                                              *     
nl     UNCONN     0      0                                                0:4194867                                            *     
nl     UNCONN     0      0                                                0:563                                              *     
nl     UNCONN     4352   0                                                4:14438                                            *     
nl     UNCONN     768    0                                                4:0                                                *     
nl     UNCONN     0      0                                                6:0                                                *     
nl     UNCONN     0      0                                                7:0                                                *     
nl     UNCONN     0      0                                                9:1                                                *     
nl     UNCONN     0      0                                                9:0                                                *     
nl     UNCONN     0      0                                                9:544                                              *     
nl     UNCONN     0      0                                               10:0                                                *     
nl     UNCONN     0      0                                               11:0                                                *     
nl     UNCONN     0      0                                               15:-4117                                            *     
nl     UNCONN     0      0                                               15:563                                              *     
nl     UNCONN     0      0                                               15:1                                                *     
nl     UNCONN     0      0                                               15:-4107                                            *     
nl     UNCONN     0      0                                               15:585                                              *     
nl     UNCONN     0      0                                               15:0                                                *     
nl     UNCONN     0      0                                               15:-4118                                            *     
nl     UNCONN     0      0                                               15:-4119                                            *     
nl     UNCONN     0      0                                               15:-4121                                            *     
nl     UNCONN     0      0                                               15:568                                              *     
nl     UNCONN     0      0                                               15:-4120                                            *     
nl     UNCONN     0      0                                               16:0                                                *     
nl     UNCONN     0      0                                               18:0                                                *     
p_raw  UNCONN     0      0                                                *:eth0                                             *     
u_dgr  LISTEN     0      128                              /run/udev/control 9997                                            * 0    
u_str  LISTEN     0      128                          /var/run/rpcbind.sock 14110                                           * 0    
u_str  LISTEN     0      128                              /tmp/.X11-unix/X0 13382                                           * 0    
u_str  LISTEN     0      128                        /run/lvm/lvmetad.socket 10053                                           * 0    
u_str  LISTEN     0      128                             @/tmp/.X11-unix/X0 13381                                           * 0    
u_str  LISTEN     0      30            /var/run/NetworkManager/private-dhcp 13411                                           * 0    
u_dgr  UNCONN     0      0                @/org/freedesktop/systemd1/notify 9863                                            * 0    
u_str  LISTEN     0      5                     /var/run/xdmctl/dmctl/socket 13183                                           * 0    
u_str  LISTEN     0      100                                  public/pickup 15079                                           * 0    
u_str  LISTEN     0      100                                 public/cleanup 15083                                           * 0    
u_str  LISTEN     0      100                                    public/qmgr 15086                                           * 0    
u_str  LISTEN     0      30                            /run/systemd/private 9865                                            * 0    
u_str  LISTEN     0      100                                   public/flush 15108                                           * 0    
u_str  LISTEN     0      128                    /run/systemd/journal/stdout 6040                                            * 0    
u_str  LISTEN     0      100                                   public/showq 15123                                           * 0    
u_dgr  UNCONN     0      0                      /run/systemd/journal/socket 6043                                            * 0    
u_dgr  UNCONN     0      0                                         /dev/log 6045                                            * 0    
u_str  LISTEN     0      100                                 private/tlsmgr 15090                                           * 0    
u_str  LISTEN     0      100                                private/rewrite 15093                                           * 0    
u_str  LISTEN     0      128                   /var/run/avahi-daemon/socket 12460                                           * 0    
u_str  LISTEN     0      100                                 private/bounce 15096                                           * 0    
u_str  LISTEN     0      128                          /var/run/rpcbind.sock 12463                                           * 0    
u_str  LISTEN     0      128                        /var/run/cups/cups.sock 12465                                           * 0    
u_str  LISTEN     0      100                                  private/defer 15099                                           * 0    
u_str  LISTEN     0      128                /var/run/dbus/system_bus_socket 12467                                           * 0    
u_str  LISTEN     0      100                                  private/trace 15102                                           * 0    
u_str  LISTEN     0      100                                 private/verify 15105                                           * 0    
u_str  LISTEN     0      100                               private/proxymap 15111                                           * 0    
u_str  LISTEN     0      100                             private/proxywrite 15114                                           * 0    
u_str  LISTEN     0      100                                   private/smtp 15117                                           * 0    
u_str  LISTEN     0      100                                  private/relay 15120                                           * 0    
u_str  LISTEN     0      100                                  private/error 15126                                           * 0    
u_str  LISTEN     0      100                                private/discard 15132                                           * 0    
u_str  LISTEN     0      100                                  private/local 15135                                           * 0    
u_str  LISTEN     0      100                                private/virtual 15138                                           * 0    
u_str  LISTEN     0      100                                   private/lmtp 15141                                           * 0    
u_str  LISTEN     0      100                                  private/anvil 15144                                           * 0    
u_str  LISTEN     0      100                                 private/scache 15147                                           * 0    
u_str  LISTEN     0      128                 /tmp/ssh-TZsAmxXERQ/agent.3784 17532                                           * 0    
u_str  LISTEN     0      10                       /var/run/abrt/abrt.socket 13266                                           * 0    
u_str  LISTEN     0      100                                  private/retry 15129                                           * 0    
u_dgr  UNCONN     0      0                           /run/systemd/shutdownd 9958                                            * 0    
u_str  LISTEN     0      30                 /var/run/NetworkManager/private 13300                                           * 0    
u_str  LISTEN     0      5                  /var/run/xdmctl/dmctl-:0/socket 13566                                           * 0    
u_dgr  UNCONN     0      0                                                * 15047                                           * 6045 
u_dgr  UNCONN     0      0                                                * 28643                                           * 6045 
u_dgr  UNCONN     0      0                                                * 12449                                           * 6045 
u_dgr  UNCONN     0      0                                                * 22790                                           * 6043 
u_dgr  UNCONN     0      0                                                * 13308                                           * 6045 
u_dgr  UNCONN     0      0                                                * 11206                                           * 6043 
u_dgr  UNCONN     0      0                                                * 15169                                           * 6045 
u_dgr  UNCONN     0      0                                                * 17524                                           * 6045 
u_dgr  UNCONN     0      0                                                * 11257                                           * 11258
u_dgr  UNCONN     0      0                                                * 13526                                           * 6045 
u_dgr  UNCONN     0      0                                                * 13401                                           * 6045 
u_dgr  UNCONN     0      0                                                * 13112                                           * 6045 
u_dgr  UNCONN     0      0                                                * 12939                                           * 6045 
u_dgr  UNCONN     0      0                                                * 12948                                           * 6043 
u_dgr  UNCONN     0      0                                                * 14454                                           * 6045 
u_dgr  UNCONN     0      0                                                * 13284                                           * 6045 
u_dgr  UNCONN     0      0                                                * 13268                                           * 0    
u_dgr  UNCONN     0      0                                                * 11258                                           * 11257
tcp    UNCONN     0      0                                                *:111                                             *:*     
tcp    UNCONN     0      0                                                *:5353                                            *:*     
tcp    UNCONN     0      0                                                *:813                                             *:*     
tcp    UNCONN     0      0                                                *:63278                                           *:*     
tcp    UNCONN     0      0                                        127.0.0.1:841                                             *:*     
tcp    UNCONN     0      0                                                *:38760                                           *:*     
tcp    UNCONN     0      0                                                *:60884                                           *:*     
tcp    UNCONN     0      0                                                *:68                                              *:*     
tcp    LISTEN     0      128                                              *:48136                                           *:*     
tcp    LISTEN     0      128                                              *:111                                             *:*     
tcp    LISTEN     0      128                                              *:22                                              *:*     
tcp    LISTEN     0      100                                      127.0.0.1:25                                              *:*     
tcp    LISTEN     0      128                                      127.0.0.1:6010                                            *:*     
tcp    LISTEN     0      128                                      127.0.0.1:6011                                            *:*

Expected results:
no "nl", "p_raw", "u_str" or "u_dgr" socket listed

Additional info:

Comment 1 RHEL Program Management 2014-03-22 05:53:21 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Pavel Šimerda (pavlix) 2015-04-08 13:35:20 UTC
Upstream already handles this correctly, we are going to backport it.

Comment 9 Pavel Šimerda (pavlix) 2015-04-17 00:24:16 UTC
The following commit is a candidate for fixing this issue:

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>

Comment 10 Pavel Šimerda (pavlix) 2015-04-17 14:55:15 UTC
One preceding patch is missing as well:

commit 30b669d7ac3cc233272f0f23bc6b547a298f373e
Author: Masatake YAMATO <yamato>
Date:   Wed Jan 8 20:13:46 2014 +0900

    ss: handle seqpacket type of unix domain socket
    
    ss didn't distignish seqpacket type from dgram type.
    With this patch ss can distignish it.
    
     $ misc/ss -x -a | grep seq
     u_seq  LISTEN     0      128    /run/udev/control 10966                 * 0
     u_seq  ESTAB      0      0                    * 115103                * 115104
     u_seq  ESTAB      0      0                    * 115104                * 115103
    
    Signed-off-by: Masatake YAMATO <yamato>

After applying both of the patches (except hunks that wouldn't apply), output is as expected. I'm going to adapt the pair of patches so that all hunks apply.

Comment 15 Pavel Šimerda (pavlix) 2015-04-28 10:25:31 UTC
Fixed as part of bug #1215006.

Comment 16 Pavel Šimerda (pavlix) 2015-04-28 10:28:02 UTC
# ss -ln -f inet
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port 
udp UNCONN 0 0 *:68 *:* 
udp UNCONN 0 0 *:5353 *:* 
udp UNCONN 0 0 *:48379 *:* 
udp UNCONN 0 0 *:56679 *:* 
tcp LISTEN 0 128 *:22 *:*

Comment 19 errata-xmlrpc 2015-11-19 14:41:09 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-2015-2117.html


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