FreeBSD Bugzilla – Attachment 181554 Details for
Bug 218433
Ipfilter ippool table handling source code or man page being incorrect.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Temporary fix for this PR.
ippool.diff (text/plain), 1.27 KB, created by
Cy Schubert
on 2017-04-07 01:39:08 UTC
(
hide
)
Description:
Temporary fix for this PR.
Filename:
MIME Type:
Creator:
Cy Schubert
Created:
2017-04-07 01:39:08 UTC
Size:
1.27 KB
patch
obsolete
>Index: contrib/ipfilter/tools/ippool.c >=================================================================== >--- contrib/ipfilter/tools/ippool.c (revision 316573) >+++ contrib/ipfilter/tools/ippool.c (working copy) >@@ -262,7 +262,7 @@ > char *argv[]; > { > int type, role, c, err; >- char *poolname; >+ char *poolname, *typearg = NULL; > iphtable_t iph; > ip_pool_t pool; > >@@ -274,7 +274,9 @@ > bzero((char *)&iph, sizeof(iph)); > bzero((char *)&pool, sizeof(pool)); > >- while ((c = getopt(argc, argv, "dm:no:RSv")) != -1) >+ optreset = optind = 1; >+ >+ while ((c = getopt(argc, argv, "dm:no:RSvt:")) != -1) > switch (c) > { > case 'd' : >@@ -303,8 +305,18 @@ > case 'v' : > opts |= OPT_VERBOSE; > break; >+ case 't' : >+ type = gettype(optarg, &iph.iph_type); >+ typearg = optarg; >+ break; >+ default : >+ usage(argv[0]); >+ break; /* keep compiler happy */ > } > >+ if (argc - optind > 0) >+ usage(argv[0]); >+ > if (opts & OPT_DEBUG) > fprintf(stderr, "poolcommand: opts = %#x\n", opts); > >@@ -313,9 +325,11 @@ > return -1; > } > >- type = gettype(argv[optind], &iph.iph_type); > if (type == IPLT_NONE) { >- fprintf(stderr, "unknown type '%s'\n", argv[optind]); >+ if (typearg == NULL) >+ usage(argv[0]); >+ else >+ fprintf(stderr, "unknown type '%s'\n", typearg); > return -1; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 218433
:
181554
|
182179
|
182201
|
182231
|
182323