[iproute/f17] ss: list all, not just TCP sockets by default
Petr Šabata
psabata at fedoraproject.org
Wed Dec 12 10:51:16 UTC 2012
commit 81bc01b324e75232839924f49ebca036ac578806
Author: Petr Šabata <contyk at redhat.com>
Date: Wed Dec 12 11:51:11 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 b23b0bd..7e2ae00 100644
--- a/iproute.spec
+++ b/iproute.spec
@@ -2,7 +2,7 @@
Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 3.3.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Group: Applications/System
URL: http://kernel.org/pub/linux/utils/net/%{name}2/
Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.gz
@@ -19,6 +19,7 @@ Patch7: iproute2-2.6.35-print-route.patch
Patch8: iproute2-print-route-u32.patch
Patch9: iproute2-2.6.39-create-peer-veth-without-a-name.patch
Patch10: iproute2-2.6.39-lnstat-dump-to-stdout.patch
+Patch11: 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
BuildRequires: flex linux-atm-libs-devel psutils db4-devel bison
@@ -65,6 +66,7 @@ sed -i "s/_VERSION_/%{version}/" man/man8/ss.8
%patch8 -p1 -b .print-route-u32
%patch9 -p1 -b .peer-veth-without-name
%patch10 -p1 -b .lnstat-dump-to-stdout
+%patch11 -p1 -b .ss-list-all
%build
export LIBDIR=/%{_libdir}
@@ -175,6 +177,9 @@ done
%{_includedir}/libnetlink.h
%changelog
+* Wed Dec 12 2012 Petr Šabata <contyk at redhat.com> - 3.3.0-3
+- ss: list all, not just TCP sockets by default (#829630)
+
* Mon Apr 30 2012 Petr Šabata <contyk at redhat.com> - 3.3.0-2
- Let's install rtmon too... (#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