[iproute/f15] Display closed UDP sockets on 'ss -ul' (#691100)

Petr Šabata psabata at fedoraproject.org
Thu Nov 24 10:19:02 UTC 2011


commit 76e1871ec621df469e0a00f787438461d8ceb429
Author: Petr Šabata <contyk at redhat.com>
Date:   Thu Nov 24 11:16:24 2011 +0100

    Display closed UDP sockets on 'ss -ul' (#691100)

 iproute.spec                                       |    7 +++-
 ....6.38-Display-closed-UDP-sockets-on-ss-ul.patch |   34 ++++++++++++++++++++
 2 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/iproute.spec b/iproute.spec
index 955d8cc..e4432b6 100644
--- a/iproute.spec
+++ b/iproute.spec
@@ -2,7 +2,7 @@
 Summary:            Advanced IP routing and network device configuration tools
 Name:               iproute
 Version:            2.6.38.1
-Release:            4%{?dist}
+Release:            5%{?dist}
 Group:              Applications/System
 URL:                http://www.linuxfoundation.org/collaborate/workgroups/networking/%{name}2
 Source0:            http://devresources.linuxfoundation.org/dev/iproute2/download/%{name}2-%{version}.tar.bz2
@@ -19,6 +19,7 @@ Patch7:             iproute2-example-cbq-service.patch
 Patch8:             iproute2-2.6.35-print-route.patch
 Patch9:             iproute2-print-route-u32.patch
 Patch10:            iproute2-2.6.33-create-peer-veth-without-a-name.patch
+Patch11:            iproute2-2.6.38-Display-closed-UDP-sockets-on-ss-ul.patch
 
 License:            GPLv2+ and Public Domain
 BuildRequires:      tex(latex) tex(dvips) linuxdoc-tools
@@ -62,6 +63,7 @@ sed -i "s/_VERSION_/%{version}/" man/man8/ss.8
 %patch8 -p1 -b .print-route
 %patch9 -p1 -b .print-route-u32
 %patch10 -p1 -b .peer-veth-without-name
+%patch11 -p1 -b .ssul
 
 %build
 export LIBDIR=/%{_libdir}
@@ -183,6 +185,9 @@ done
 %{_includedir}/libnetlink.h
 
 %changelog
+* Thu Nov 24 2011 Petr Šabata <contyk at redhat.com> - 2.6.38.1-5
+- Display closed UDP sockets on 'ss -ul' (#691100)
+
 * Wed Apr 27 2011 Petr Sabata <psabata at redhat.com> - 2.6.38.1-4
 - Link [cr]tstat to lnstat
 
diff --git a/iproute2-2.6.38-Display-closed-UDP-sockets-on-ss-ul.patch b/iproute2-2.6.38-Display-closed-UDP-sockets-on-ss-ul.patch
new file mode 100644
index 0000000..daa9100
--- /dev/null
+++ b/iproute2-2.6.38-Display-closed-UDP-sockets-on-ss-ul.patch
@@ -0,0 +1,34 @@
+From 16963ce6f01f94d1f5486008c4d73f5612beb1a6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0abata?= <contyk at redhat.com>
+Date: Wed, 16 Nov 2011 09:32:20 -0800
+Subject: [PATCH 1/7] Display closed UDP sockets on 'ss -ul'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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 at redhat.com>
+---
+ misc/ss.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+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;
+-- 
+1.7.7.3
+


More information about the scm-commits mailing list