Skip to contentSkip to conversation

iproute2: Display closed UDP sockets on 'ss -ul'

PATCH Applied Petr Šabata 2 participants 2 messages Nov 15, 2011 – Nov 17, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iproute2: 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.

---
 misc/ss.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
misc/ss.c +1 -1
index 1353620..af774d1 100644
@@ -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;
Signature · 1 line
1.7.7.1
#1 lore raw
Quoted 6 lines · On Tue, 15 Nov 2011 16:19:26 +0100 Petr Šabata <[email protected]> wrote:

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.

Applied