[iproute/f16] ss: list all, not just TCP sockets by default

Petr Šabata psabata at fedoraproject.org
Wed Dec 12 11:41:32 UTC 2012


commit bf6be7d02a39da959a838384ad4657411cb1f971
Author: Petr Šabata <contyk at redhat.com>
Date:   Wed Dec 12 12:41:26 2012 +0100

    ss: list all, not just TCP sockets by default

 iproute.spec                                       |    7 +++-
 ...-change-default-filter-to-include-all-soc.patch |   36 ++++++++++++++++++++
 2 files changed, 42 insertions(+), 1 deletions(-)
---
diff --git a/iproute.spec b/iproute.spec
index 9c35075..aa16cab 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.39
-Release:            6%{?dist}
+Release:            7%{?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.gz
@@ -23,6 +23,7 @@ Patch11:            iproute2-2.6.39-xtables6.patch
 Patch12:            iproute2-2.6.39-Display-closed-UDP-sockets-on-ss-ul.patch
 Patch13:            iproute2-2.6.39-Dont-put-configure-files-in-tmp.patch
 Patch14:            iproute2-2.6.39-dhcp-client-script-dont-use-tmp.patch
+Patch15:            iproute2-3.7.0-ss-change-default-filter-to-include-all-soc.patch
 
 License:            GPLv2+ and Public Domain
 BuildRequires:      tex(latex) tex(dvips) linuxdoc-tools
@@ -70,6 +71,7 @@ sed -i "s/_VERSION_/%{version}/" man/man8/ss.8
 %patch12 -p1 -b .ssul
 %patch13 -p1 -b .tmp
 %patch14 -p1 -b .tmp-dhcp
+%patch15 -p1 -b .ss-list-all
 
 %build
 export LIBDIR=/%{_libdir}
@@ -192,6 +194,9 @@ done
 %{_includedir}/libnetlink.h
 
 %changelog
+* Wed Dec 12 2012 Petr Šabata <contyk at redhat.com> - 2.6.39-7
+- ss: list all, not just TCP sockets by default (#829630)
+
 * Mon Apr 30 2012 Petr Šabata <contyk at redhat.com> - 2.6.39-6
 - Include rtmon in the distribution (#814819)
 
diff --git a/iproute2-3.7.0-ss-change-default-filter-to-include-all-soc.patch b/iproute2-3.7.0-ss-change-default-filter-to-include-all-soc.patch
new file mode 100644
index 0000000..530d539
--- /dev/null
+++ b/iproute2-3.7.0-ss-change-default-filter-to-include-all-soc.patch
@@ -0,0 +1,36 @@
+From 7de7e5915a5492db964bc8ac48f17b1485e705d5 Mon Sep 17 00:00:00 2001
+From: Petr Sabata <contyk at redhat.com>
+Date: Tue, 11 Dec 2012 06:42:52 +0000
+Subject: [PATCH 1/5] iproute2: ss - change default filter to include all
+ socket types
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently the default filter lists TCP sockets only which is
+rather confusing especially when the '-a/--all' flag is used.
+This patch changes the default to include all sockets, imitating
+netstat(8) behavior.
+
+Signed-off-by: Petr Šabata <contyk at redhat.com>
+Acked-by: David S. Miller <davem at davemloft.net>
+---
+ misc/ss.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/misc/ss.c b/misc/ss.c
+index b45f5ba..b8cd60d 100644
+--- a/misc/ss.c
++++ b/misc/ss.c
+@@ -105,7 +105,7 @@ struct filter
+ };
+ 
+ struct filter default_filter = {
+-	.dbs	=  (1<<TCP_DB),
++	.dbs	=  ~0,
+ 	.states = SS_ALL & ~((1<<SS_LISTEN)|(1<<SS_CLOSE)|(1<<SS_TIME_WAIT)|(1<<SS_SYN_RECV)),
+ 	.families= (1<<AF_INET)|(1<<AF_INET6),
+ };
+-- 
+1.7.11.7
+


More information about the scm-commits mailing list