Date: Wed, 25 Jan 2017 20:41:17 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312777 - head/contrib/ipfilter/tools Message-ID: <201701252041.v0PKfHBW098356@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Wed Jan 25 20:41:16 2017 New Revision: 312777 URL: https://svnweb.freebsd.org/changeset/base/312777 Log: Issue an error message when an incorrect flush argument is encountered.` MFC after: 2 weeks Modified: head/contrib/ipfilter/tools/ipf.c Modified: head/contrib/ipfilter/tools/ipf.c ============================================================================== --- head/contrib/ipfilter/tools/ipf.c Wed Jan 25 20:33:31 2017 (r312776) +++ head/contrib/ipfilter/tools/ipf.c Wed Jan 25 20:41:16 2017 (r312777) @@ -410,12 +410,16 @@ static void flushfilter(arg, filter) return; } - if (strchr(arg, 'i') || strchr(arg, 'I')) + else if (strchr(arg, 'i') || strchr(arg, 'I')) fl = FR_INQUE; - if (strchr(arg, 'o') || strchr(arg, 'O')) + else if (strchr(arg, 'o') || strchr(arg, 'O')) fl = FR_OUTQUE; - if (strchr(arg, 'a') || strchr(arg, 'A')) + else if (strchr(arg, 'a') || strchr(arg, 'A')) fl = FR_OUTQUE|FR_INQUE; + else { + fprintf(stderr, "Incorrect flush argument: %s\n", arg); + usage(); + } if (opts & OPT_INACTIVE) fl |= FR_INACTIVE; rem = fl;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701252041.v0PKfHBW098356>