]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Display closed UDP sockets on 'ss -ul'
authorPetr Šabata <contyk@redhat.com>
Wed, 16 Nov 2011 17:32:20 +0000 (09:32 -0800)
committerStephen Hemminger <shemminger@vyatta.com>
Wed, 16 Nov 2011 17:32:20 +0000 (09:32 -0800)
This patch emulates 'netstat -ul' behavior, showing 'closed'
(state 07) UDP sockets when ss is called with '-ul' options.
Although dirty, this seems like the least invasive way to fix
it and shouldn't really break anything.

Signed-off-by: Petr Šabata <contyk@redhat.com>
misc/ss.c

index 135362074e557985029cb39e94dcdd2c6e6ceb37..af774d142479f9bf9eb23fccdc4878b9893f032f 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2568,7 +2568,7 @@ int main(int argc, char *argv[])
                        current_filter.states = SS_ALL;
                        break;
                case 'l':
-                       current_filter.states = (1<<SS_LISTEN);
+                       current_filter.states = (1<<SS_LISTEN) | (1<<SS_CLOSE);
                        break;
                case '4':
                        preferred_family = AF_INET;