Display closed UDP sockets on 'ss -ul'

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>
This commit is contained in:
Petr Šabata 2011-11-16 09:32:20 -08:00 committed by Stephen Hemminger
parent 93ba481acb
commit 16963ce6f0

View File

@ -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;