diff mbox

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

Message ID 1321370366-18832-1-git-send-email-contyk@redhat.com
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Petr Sabata Nov. 15, 2011, 3:19 p.m. UTC
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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

stephen hemminger Nov. 17, 2011, 12:25 a.m. UTC | #1
On Tue, 15 Nov 2011 16:19:26 +0100
Petr Šabata <contyk@redhat.com> 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.
> 
> Signed-off-by: Petr Šabata <contyk@redhat.com>

Applied
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/misc/ss.c b/misc/ss.c
index 1353620..af774d1 100644
--- 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;