This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 829630 - ss -a lists only TCP sockets
ss -a lists only TCP sockets
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: iproute (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Šabata
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-07 02:56 EDT by Petr Pisar
Modified: 2013-01-11 18:51 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-09 03:50:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
ss - change default filter to include all socket types (1023 bytes, patch)
2012-12-11 11:44 EST, Petr Šabata
no flags Details | Diff

  None (edit)
Description Petr Pisar 2012-06-07 02:56:42 EDT
The `ss' tool from iproute-2.6.39-6.fc16.x86_64 has option `-a' to list sockets of all types. However it lists TCP sockets only:

root@dhcp-0-146:~ # ss -ulnp | wc -l
28
root@dhcp-0-146:~ # ss -tlnp | wc -l
22
root@dhcp-0-146:~ # ss -alnp | wc -l
22
Comment 1 Paul Wouters 2012-12-08 21:45:51 EST
I just hit this one too :(

$ ss -lan |grep 500
$ ss -lun |grep 500
UNCONN     0      0              76.10.157.69:500                      *:*     
UNCONN     0      0              76.10.157.69:4500                     *:*
Comment 2 Paul Wouters 2012-12-08 21:56:30 EST
The above was on Fedora with 3.6.0-2
On rhel with 2.6.32 it is worse:

[root@nohats ~]# ss -a -l -n sport = :500
Recv-Q Send-Q                      Local Address:Port                        Peer Address:Port 
[root@nohats ~]# ss -u -l -n sport = :500
Recv-Q Send-Q                      Local Address:Port                        Peer Address:Port 
[root@nohats ~]# netstat -an |grep :500
udp        0      0 127.0.0.1:500              0.0.0.0:*                               
udp        0      0 193.110.157.102:500         0.0.0.0:*                               
udp        0      0 193.110.157.104:500         0.0.0.0:*                               
udp        0      0 ::1:500                     :::*                                    
udp        0      0 2a03:6000:1004:1::102:500   :::*                                    
udp        0      0 2001:888:2003:1004::102:500 :::*                                    
udp        0      0 2a03:6000:1004:1::104:500   :::*
Comment 3 Paul Wouters 2012-12-08 22:00:25 EST

    case 'a':
    current_filter.states = SS_ALL;
    break;
    case 'l':
    current_filter.states = (1<<SS_LISTEN) | (1<<SS_CLOSE);
    break;

(09:48:36 PM) misc: and the default filter is defined at the start of the code :
(09:48:37 PM) misc: struct filter default_filter = { .dbs    =  (1<<TCP_DB),
(09:48:44 PM) misc: and this is TCP
(09:54:50 PM) misc: in fact, ss -a do not show udp socket on my old server either
(09:55:15 PM) misc: and git log do not show change on that part ( at least, not a obvious change )
Comment 4 Petr Šabata 2012-12-11 10:40:02 EST
(In reply to comment #2)
> The above was on Fedora with 3.6.0-2
> On rhel with 2.6.32 it is worse:
> 
> [root@nohats ~]# ss -a -l -n sport = :500
> Recv-Q Send-Q                      Local Address:Port                       
> Peer Address:Port 
> [root@nohats ~]# ss -u -l -n sport = :500
> Recv-Q Send-Q                      Local Address:Port                       
> Peer Address:Port 
> [root@nohats ~]# netstat -an |grep :500
> udp        0      0 127.0.0.1:500              0.0.0.0:*                    
> 
> udp        0      0 193.110.157.102:500         0.0.0.0:*                   
> 
> udp        0      0 193.110.157.104:500         0.0.0.0:*                   
> 
> udp        0      0 ::1:500                     :::*                        
> 
> udp        0      0 2a03:6000:1004:1::102:500   :::*                        
> 
> udp        0      0 2001:888:2003:1004::102:500 :::*                        
> 
> udp        0      0 2a03:6000:1004:1::104:500   :::*

This is fixed in 2.6.32-21.el6 (bug #811219).
Comment 5 Petr Šabata 2012-12-11 10:45:08 EST
The current behavior, although different from netstat, is in line with ss documentation which just says 'all' lists both listening and non-listening sockets.  The socket type defaults to TCP in ss, as pointed out in comment #3.

I understand users expect netstat's behavior here, as ss is more or less its replacement.
Comment 6 Petr Šabata 2012-12-11 11:44:13 EST
Created attachment 661551 [details]
ss - change default filter to include all socket types

Submitted upstream.
Comment 7 Fedora Update System 2012-12-12 07:04:28 EST
iproute-3.6.0-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/iproute-3.6.0-4.fc18
Comment 8 Fedora Update System 2012-12-12 07:08:59 EST
iproute-3.3.0-3.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/iproute-3.3.0-3.fc17
Comment 9 Fedora Update System 2012-12-12 07:09:50 EST
iproute-2.6.39-7.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/iproute-2.6.39-7.fc16
Comment 10 Fedora Update System 2012-12-12 15:43:48 EST
Package iproute-3.6.0-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing iproute-3.6.0-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-20265/iproute-3.6.0-4.fc18
then log in and leave karma (feedback).
Comment 11 Fedora Update System 2012-12-20 12:03:43 EST
iproute-3.6.0-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/iproute-3.6.0-5.fc18
Comment 12 Fedora Update System 2012-12-20 12:11:16 EST
iproute-3.3.0-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/iproute-3.3.0-5.fc17
Comment 13 Fedora Update System 2012-12-20 12:12:27 EST
iproute-2.6.39-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/iproute-2.6.39-8.fc16
Comment 14 Fedora Update System 2013-01-09 03:50:30 EST
iproute-3.3.0-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Fedora Update System 2013-01-09 03:52:34 EST
iproute-2.6.39-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2013-01-11 18:51:37 EST
iproute-3.6.0-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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