From: Dan Webster Date: Thu, 24 Sep 2015 07:36:53 +0000 (+0200) Subject: ss: fix file-based filtering segfault X-Git-Tag: v4.3.0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8e35427fb14a2275221a1c920b640d9794f9e69;p=thirdparty%2Fiproute2.git ss: fix file-based filtering segfault 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: --- diff --git a/misc/ss.c b/misc/ss.c index 9efc3c850..7c3dfa3e9 100644 --- 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(¤t_filter.f, 0, NULL, filter_fp)) - usage(); - } - while (argc > 0) { if (strcmp(*argv, "state") == 0) { NEXT_ARG();