]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: Remove checking SS_CLOSE state for packet and netlink
authorvadimk <vadim4j@gmail.com>
Thu, 16 Oct 2014 08:19:29 +0000 (11:19 +0300)
committerStephen Hemminger <shemming@brocade.com>
Sat, 29 Nov 2014 19:20:51 +0000 (11:20 -0800)
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 <vadim4j@gmail.com>
misc/ss.c

index 291d85f28dccc0e8d4bc1d15a0ccb6b0ffa8ecfc..d45122404ce8330bb688c5221640c38e40617fca 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2895,9 +2895,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;
 
@@ -3133,9 +3130,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;