bin/113879: [ipf][patch] ipfstat -D,
-S does not accept "any" as host address
kabe at sra-tohoku.co.jp
kabe at sra-tohoku.co.jp
Wed Jun 20 07:50:04 UTC 2007
>Number: 113879
>Category: bin
>Synopsis: [ipf][patch] ipfstat -D, -S does not accept "any" as host address
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 20 07:50:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Taketo Kabe
>Release: FreeBSD 6.2-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD nsfw.cis 6.2-RELEASE-p5 FreeBSD 6.2-RELEASE-p5 #1: Fri May 25 14:45:23 JST 2007 root at core.cis:/usr/obj/var/src62/src/sys/GENERIC i386
>Description:
ipfstat(8) is described to accept "any" as host address filter
for -D and -S options i.e "-D any,<portnum>", but didn't.
Just adding "ok = 1;" in ipfstat.c to set the parsed flag fixes this.
[This fix is not FreeBSD specific and should be submitted to
ipfilter core also]
>How-To-Repeat:
# ipfstat -S any,any
Invalid IP address: any
>Fix:
--- src/contrib/ipfilter/tools/ipfstat.c.dist Thu Aug 24 07:37:10 2006
+++ src/contrib/ipfilter/tools/ipfstat.c Wed Jun 20 06:54:57 2007
@@ -1567,7 +1567,7 @@
*port = -1;
} else if (!sscanf(comma + 1, "%d", port) ||
(*port < 0) || (*port > 65535)) {
- fprintf(stderr, "Invalid port specfication in %s\n",
+ fprintf(stderr, "Invalid port specification in %s\n",
argument);
free(s);
exit(-2);
@@ -1579,6 +1579,7 @@
/* get ip address */
if (!strcasecmp(s, "any")) {
ip->in4.s_addr = INADDR_ANY;
+ ok = 1;
#ifdef USE_INET6
ip->in6 = in6addr_any;
} else if (use_inet6 && inet_pton(AF_INET6, s, &ip->in6)) {
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list