ipfstat should parse "any" when used with -D/-S command line options
PR: bin/113879 Submitted by: kabe@sra-tohoku.co.jp Reviewed by: darrenr Approved by: re
This commit is contained in:
parent
e088274144
commit
a909f8869b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171017
@ -1811,7 +1811,7 @@ int *port;
|
|||||||
*port = -1;
|
*port = -1;
|
||||||
} else if (!sscanf(comma + 1, "%d", port) ||
|
} else if (!sscanf(comma + 1, "%d", port) ||
|
||||||
(*port < 0) || (*port > 65535)) {
|
(*port < 0) || (*port > 65535)) {
|
||||||
fprintf(stderr, "Invalid port specfication in %s\n",
|
fprintf(stderr, "Invalid port specification in %s\n",
|
||||||
argument);
|
argument);
|
||||||
free(s);
|
free(s);
|
||||||
exit(-2);
|
exit(-2);
|
||||||
@ -1823,6 +1823,7 @@ int *port;
|
|||||||
/* get ip address */
|
/* get ip address */
|
||||||
if (!strcasecmp(s, "any")) {
|
if (!strcasecmp(s, "any")) {
|
||||||
ip->in4.s_addr = INADDR_ANY;
|
ip->in4.s_addr = INADDR_ANY;
|
||||||
|
ok = 1;
|
||||||
#ifdef USE_INET6
|
#ifdef USE_INET6
|
||||||
ip->in6 = in6addr_any;
|
ip->in6 = in6addr_any;
|
||||||
} else if (use_inet6 && inet_pton(AF_INET6, s, &ip->in6)) {
|
} else if (use_inet6 && inet_pton(AF_INET6, s, &ip->in6)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user