]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commitdiff
Fix the error of "ss -f inet -t"
authorLi Yewang <lyw@cn.fujitsu.com>
Tue, 9 Sep 2008 01:06:47 +0000 (09:06 +0800)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Thu, 18 Sep 2008 05:05:00 +0000 (22:05 -0700)
when using the "ss -f inet -t" command to show the tcp socket information of
inet domain, we get the error message: "ss: no socket tables to show with such filter."

This patch can fix this bug.

Signed-off-by: Li Yewang <lyw@cn.fujitsu.com>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
misc/ss.c

index 38eed29db150f1b757d30334cbb8665a695fb97d..e06946b49ad2347bd427393fe38407811c0315f3 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2622,9 +2622,7 @@ int main(int argc, char *argv[])
                int mask2;
                if (preferred_family == AF_INET ||
                    preferred_family == AF_INET6) {
-                       mask2= (1<<TCP_DB);
-                       if (!do_default)
-                               mask2 = (1<<UDP_DB)|(1<<RAW_DB);
+                       mask2= current_filter.dbs;
                } else if (preferred_family == AF_PACKET) {
                        mask2 = PACKET_DBM;
                } else if (preferred_family == AF_UNIX) {