Vadim Kochan
2014-10-16 08:19:29 UTC
I dont see a reason that packet and netlink states will be
printed only if SS_CLOSE state is set in filter, in that case
to print states of netlink or packet sockets it is needed to run:
ss -A netlink state close
instead of:
ss -A netlink
Signed-off-by: Vadim Kochan <***@gmail.com>
---
misc/ss.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 2420b51..2500c87 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2882,9 +2882,6 @@ static int packet_show(struct filter *f)
int ino;
unsigned long long sk;
- if (!(f->states & (1<<SS_CLOSE)))
- return 0;
-
if (packet_show_netlink(f, NULL) == 0)
return 0;
@@ -3119,9 +3116,6 @@ static int netlink_show(struct filter *f)
int rq, wq, rc;
unsigned long long sk, cb;
- if (!(f->states & (1<<SS_CLOSE)))
- return 0;
-
if (!getenv("PROC_NET_NETLINK") && !getenv("PROC_ROOT") &&
netlink_show_netlink(f, NULL) == 0)
return 0;
printed only if SS_CLOSE state is set in filter, in that case
to print states of netlink or packet sockets it is needed to run:
ss -A netlink state close
instead of:
ss -A netlink
Signed-off-by: Vadim Kochan <***@gmail.com>
---
misc/ss.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/misc/ss.c b/misc/ss.c
index 2420b51..2500c87 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2882,9 +2882,6 @@ static int packet_show(struct filter *f)
int ino;
unsigned long long sk;
- if (!(f->states & (1<<SS_CLOSE)))
- return 0;
-
if (packet_show_netlink(f, NULL) == 0)
return 0;
@@ -3119,9 +3116,6 @@ static int netlink_show(struct filter *f)
int rq, wq, rc;
unsigned long long sk, cb;
- if (!(f->states & (1<<SS_CLOSE)))
- return 0;
-
if (!getenv("PROC_NET_NETLINK") && !getenv("PROC_ROOT") &&
netlink_show_netlink(f, NULL) == 0)
return 0;
--
2.1.0
2.1.0