]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: fix file-based filtering segfault
authorDan Webster <dsw@hexology.net>
Thu, 24 Sep 2015 07:36:53 +0000 (09:36 +0200)
committerStephen Hemminger <shemming@brocade.com>
Fri, 25 Sep 2015 19:36:43 +0000 (12:36 -0700)
Commit 1527a17 introduced a change where the second of two ssfilter_parse()
calls in ss.c was moved outside of a conditional block (ss.c: ~3575). This
commit enabled the parsing of services, such as 'sport = :ssh', but
inadvertently broke the '-F' file-based filtering:

misc/ss.c

index 9efc3c8508dfc90d89be7018ea60c6afd18ee709..7c3dfa3e95d07bf669a9d40b608b10396ebaae9a 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -3782,12 +3782,6 @@ int main(int argc, char *argv[])
                        exit(0);
        }
 
-       /* Now parse filter... */
-       if (argc == 0 && filter_fp) {
-               if (ssfilter_parse(&current_filter.f, 0, NULL, filter_fp))
-                       usage();
-       }
-
        while (argc > 0) {
                if (strcmp(*argv, "state") == 0) {
                        NEXT_ARG();