Bug 1063927 - backport: ss: udp sockets are reported as tcp
Summary: backport: ss: udp sockets are reported as tcp
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 1279974
TreeView+ depends on / blocked
 
Reported: 2014-02-11 16:14 UTC by Hubert Kario
Modified: 2019-08-15 03:45 UTC (History)
12 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-11-19 14:41:02 UTC
Target Upstream Version:


Attachments (Terms of Use)


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

Description Hubert 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


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