diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2020-07-17 19:07:44 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2020-07-17 19:07:44 +0000 |
| commit | 08c24e2f886854e8eadb9a522a451fcc6a78480a (patch) | |
| tree | ab3afd1d6aa187c507b28c11628fa49ba4da51cf /contrib/ipfilter | |
| parent | 88b86bb0f3eb922e893837d83f1423e43e798517 (diff) | |
Notes
Diffstat (limited to 'contrib/ipfilter')
| -rw-r--r-- | contrib/ipfilter/man/ipfstat.8 | 3 | ||||
| -rw-r--r-- | contrib/ipfilter/tools/ipfstat.c | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/contrib/ipfilter/man/ipfstat.8 b/contrib/ipfilter/man/ipfstat.8 index 63fb4a9cadb5..3762bccbdccf 100644 --- a/contrib/ipfilter/man/ipfstat.8 +++ b/contrib/ipfilter/man/ipfstat.8 @@ -195,4 +195,5 @@ more entries is to resize the screen. .SH SEE ALSO ipf(8) .SH BUGS -\fB-4\fP and \fB-6\fP should also be the default when displaying states. +\fB-4\fP and \fB-6\fP are only valid with \fB-i\fP, \fB-o\fP, and \fB-t\fP. +An error should result when used with other arguments. diff --git a/contrib/ipfilter/tools/ipfstat.c b/contrib/ipfilter/tools/ipfstat.c index 0e9d71fa67a9..43878f44d246 100644 --- a/contrib/ipfilter/tools/ipfstat.c +++ b/contrib/ipfilter/tools/ipfstat.c @@ -421,9 +421,9 @@ int main(argc,argv) else if (opts & OPT_STATETOP) topipstates(saddr, daddr, sport, dport, protocol, #ifdef USE_INET6 - use_inet6 && !use_inet4 ? 6 : 4, + use_inet6 && use_inet4 ? 0 : use_inet6 && !use_inet4 ? 6 : 4, #else - 4, + 4, #endif #endif refreshtime, topclosed, filter); @@ -1367,7 +1367,7 @@ static void topipstates(saddr, daddr, sport, dport, protocol, ver, if (ipsstp->iss_list == NULL) break; - if (ips.is_v != ver) + if (ver != 0 && ips.is_v != ver) continue; if ((filter != NULL) && |
