Date: Fri, 17 Jul 2020 19:07:53 +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: r363283 - head/contrib/ipfilter/tools Message-ID: <202007171907.06HJ7rMD016073@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Fri Jul 17 19:07:53 2020 New Revision: 363283 URL: https://svnweb.freebsd.org/changeset/base/363283 Log: -4 and -6 only make sense with -i, -o, and -t. PR: 247952 MFC after: 1 week Modified: head/contrib/ipfilter/tools/ipfstat.c Modified: head/contrib/ipfilter/tools/ipfstat.c ============================================================================== --- head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:50 2020 (r363282) +++ head/contrib/ipfilter/tools/ipfstat.c Fri Jul 17 19:07:53 2020 (r363283) @@ -394,6 +394,15 @@ int main(argc,argv) } } #ifdef USE_INET6 + if ((use_inet4 || use_inet6) && + !(opts & (OPT_INQUE | OPT_OUTQUE | OPT_STATETOP))) { +#ifdef STATETOP + FPRINTF(stderr, "No -i, -o, or -t given with -4 or -6\n"); +#else + FPRINTF(stderr, "No -i or -o given with -4 or -6\n"); +#endif + exit(-2); + } if (use_inet4 == 0 && use_inet6 == 0) use_inet4 = use_inet6 = 1; #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007171907.06HJ7rMD016073>