Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1063927

Summary: backport: ss: udp sockets are reported as tcp
Product: Red Hat Enterprise Linux 7 Reporter: Alicja Kario <hkario>
Component: iprouteAssignee: Pavel Šimerda (pavlix) <psimerda>
Status: CLOSED ERRATA QA Contact: Jaroslav Aster <jaster>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: htaira, jaster, kmoriwak, ksrot, mori, msrivast, ori, ovasik, psimerda, psutter, thozza, tsekiyam
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: iproute-3.10.0-24.el7 Doc Type: Bug Fix
Doc Text:
UDP sockets were previously marked as "tcp" in the "Netid" column of the "ss -a" command output. The "ss" utility source code has been modified to fix this problem, and UDP sockets are now correctly marked as "udp" in the "ss -a" output.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 14:41:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1215006    
Bug Blocks: 1039625, 1279974    

Description Alicja Kario 2014-02-11 16:14:28 UTC
Description of problem:
`ss` command doesn't distinguish tcp sockets from udp sockets.

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

How reproducible:
Always

Steps to Reproduce:
1. ss -anu
2. ss -an | grep udp

Actual results:
[root@rhel7-64 ~]# ss -an | grep udp
[root@rhel7-64 ~]# ss -anu
State       Recv-Q Send-Q       Local Address:Port         Peer Address:Port 
UNCONN      0      0                        *:823                     *:*     
UNCONN      0      0                127.0.0.1:856                     *:*     
UNCONN      0      0                        *:11099                   *:*     
UNCONN      0      0                        *:68                      *:*     
UNCONN      0      0                        *:50248                   *:*     
UNCONN      0      0                        *:45159                   *:*     
UNCONN      0      0                        *:111                     *:*     
UNCONN      0      0                        *:5353                    *:*     
UNCONN      0      0                       :::823                    :::*     
UNCONN      0      0                       :::45566                  :::*     
UNCONN      0      0                       :::30264                  :::*     
UNCONN      0      0                       :::111                    :::*

Expected results:
Same output in both cases

Additional info:
I also don't like the "UNCONN" state for UDP sockets that are acutally listening, but that probably can't be changed now...

Comment 1 Petr Šabata 2014-02-18 13:55:07 UTC
The UDP sockets are not listed by default and you need to explcitly request them with -u.  Also note -a doesn't mean 'all socket types' but 'all socket states'.  Plus, when you request just one type explicitly (-u, -t, -d), no other sockets but those are listed and the type column is not present.

What you want to do is `ss -anut', which is indeed buggy and shows the `tcp' flag for both TCP and UDP sockets.

The `ss' utility needs a lot of love; there are many issues with it.  I hope to fix this in the next release.  It's too late for 7.0 now.

Comment 5 Hajime Taira 2015-03-08 00:50:59 UTC
I seem that easy to fix this issue.
Do you have any updates?

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

# ss -an | grep udp
udp UNCONN 0 0 :::58 :::* 
udp UNCONN 0 0 *:68 *:* 
udp UNCONN 0 0 *:5353 *:* 
udp UNCONN 0 0 *:48379 *:* 
udp UNCONN 0 0 *:56679 *:* 
udp UNCONN 0 0 :::24735 :::* 
# ss -anu
State Recv-Q Send-Q Local Address:Port Peer Address:Port 
UNCONN 0 0 *:68 *:* 
UNCONN 0 0 *:5353 *:* 
UNCONN 0 0 *:48379 *:* 
UNCONN 0 0 *:56679 *:* 
UNCONN 0 0 :::24735 :::*

Comment 22 errata-xmlrpc 2015-11-19 14:41:02 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