diff options
| author | jojemann <none@none> | 2008-04-30 03:10:33 -0700 |
|---|---|---|
| committer | jojemann <none@none> | 2008-04-30 03:10:33 -0700 |
| commit | 786c70747614169d73f085365beecfbd6861ffcf (patch) | |
| tree | d9e06b75baf5a0f9f4ed517fc1c1bfe945b76a8e /usr/src/cmd/ipf | |
| parent | 6725680357ffd955fcc03d519e70de4c93ee9d61 (diff) | |
| download | illumos-joyent-786c70747614169d73f085365beecfbd6861ffcf.tar.gz | |
6685076 ippool and other ipf utilities have possible race condition
6685092 ipfilter list processing function(s) have unsafe edge case(s)
Diffstat (limited to 'usr/src/cmd/ipf')
| -rw-r--r-- | usr/src/cmd/ipf/tools/ipfstat.c | 9 | ||||
| -rw-r--r-- | usr/src/cmd/ipf/tools/ipnat.c | 8 |
2 files changed, 3 insertions, 14 deletions
diff --git a/usr/src/cmd/ipf/tools/ipfstat.c b/usr/src/cmd/ipf/tools/ipfstat.c index 5dd2425102..4945ffe8be 100644 --- a/usr/src/cmd/ipf/tools/ipfstat.c +++ b/usr/src/cmd/ipf/tools/ipfstat.c @@ -3,7 +3,7 @@ * * See the IPFILTER.LICENCE file for details on licencing. * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -782,7 +782,7 @@ char *group, *comment; { frgroup_t *grtop, *grtail, *g; struct frentry fb, *fg; - int type, n; + int n; ipfruleiter_t rule; ipfobj_t obj; @@ -815,8 +815,6 @@ char *group, *comment; rule.iri_rule = fp; if (ioctl(ipf_fd, SIOCIPFITER, &obj) == -1) { perror("ioctl(SIOCIPFITER)"); - type = IPFGENITER_IPF; - (void) ioctl(ipf_fd, SIOCIPFDELTOK, &type); return; } if (fp->fr_data != NULL) @@ -863,9 +861,6 @@ char *group, *comment; } } while (fp->fr_next != NULL); - type = IPFGENITER_IPF; - (void) ioctl(ipf_fd, SIOCIPFDELTOK, &type); - while ((g = grtop) != NULL) { printlivelist(out, set, NULL, g->fg_name, comment); grtop = g->fg_next; diff --git a/usr/src/cmd/ipf/tools/ipnat.c b/usr/src/cmd/ipf/tools/ipnat.c index 43157ec67d..57a0bab951 100644 --- a/usr/src/cmd/ipf/tools/ipnat.c +++ b/usr/src/cmd/ipf/tools/ipnat.c @@ -5,7 +5,7 @@ * * Added redirect stuff and a variety of bug fixes. (mcn@EnGarde.com) * - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -450,8 +450,6 @@ int fd, opts; nsp->ns_list = ipn.in_next; } - (void) ioctl(fd, SIOCIPFDELTOK, &iter.igi_type); - printf("\nList of active sessions:\n"); iter.igi_type = IPFGENITER_NAT; @@ -467,8 +465,6 @@ int fd, opts; nsp->ns_instances = nat.nat_next; } - (void) ioctl(fd, SIOCIPFDELTOK, &iter.igi_type); - if (opts & OPT_VERBOSE) showhostmap_live(fd, nsp); } @@ -502,6 +498,4 @@ natstat_t *nsp; printhostmap(&hm, 0); nsp->ns_maplist = hm.hm_next; } - - (void) ioctl(fd, SIOCIPFDELTOK, &iter.igi_type); } |
