summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ipf/tools/ipmon.c
diff options
context:
space:
mode:
authorKeith M Wesolowski <wesolows@foobazco.org>2014-12-12 01:07:53 +0000
committerKeith M Wesolowski <wesolows@foobazco.org>2014-12-12 01:12:52 +0000
commit9ac12c332066277450c2da11fcedba7860bfe040 (patch)
treed70d9933eacf79cff70289fc1696c1773a3fd4a3 /usr/src/cmd/ipf/tools/ipmon.c
parent86f171cce442c1619a2a5efbc1b6ec65e70975b3 (diff)
parentb7070b7dbcc2758a7f87cefb69ad42887a287152 (diff)
downloadillumos-joyent-9ac12c332066277450c2da11fcedba7860bfe040.tar.gz
[illumos-gate merge]
commit b7070b7dbcc2758a7f87cefb69ad42887a287152 5427 memory leak in libzfs when doing rollback commit 94bdecd9e84ae1042607002db3e64a6849da5874 5198 Want alternate global zone rule set for each ipf netstack 5197 Global zone should be able to manage NGZ ipf state commit c67987612cd8324e1f3d1b5110086552d19a2d89 5200 ipf_stack_destroy error messages when halting zones commit 2f443e27e5988131d8b57bec58ee15f9227e0899 5096 getaddrinfo doesn't properly handle AI_ADDRCONFIG | AI_V4MAPPED commit e48cae6f8c603e9a18cdb49fdf939cd4e1753e62 4643 nss_dns fails to obtain dns ttls Conflicts: usr/src/uts/intel/ipf/ipf.global-objs.debug64 usr/src/uts/common/inet/ipf/solaris.c usr/src/uts/common/inet/ipf/netinet/ipf_stack.h usr/src/uts/common/inet/ipf/netinet/ip_fil.h usr/src/uts/common/inet/ipf/ip_log.c usr/src/uts/common/inet/ipf/ip_fil_solaris.c usr/src/uts/common/inet/ipf/fil.c usr/src/man/man1m/ippool.1m usr/src/man/man1m/ipnat.1m usr/src/man/man1m/ipf.1m usr/src/lib/nsswitch/dns/common/dns_common.c usr/src/lib/nsswitch/dns/Makefile.com usr/src/lib/libzfs/common/libzfs_iter.c usr/src/cmd/ipf/tools/ippool.c usr/src/cmd/ipf/tools/ipnat.c usr/src/cmd/ipf/tools/ipmon.c usr/src/cmd/ipf/tools/ipfzone.c usr/src/cmd/ipf/tools/ipfstat.c usr/src/cmd/ipf/tools/ipfs.c usr/src/cmd/ipf/tools/ipf.c usr/src/cmd/ipf/lib/common/load_poolnode.c usr/src/cmd/ipf/lib/common/load_pool.c usr/src/cmd/ipf/lib/common/load_hashnode.c usr/src/cmd/ipf/lib/common/load_hash.c
Diffstat (limited to 'usr/src/cmd/ipf/tools/ipmon.c')
-rw-r--r--usr/src/cmd/ipf/tools/ipmon.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/usr/src/cmd/ipf/tools/ipmon.c b/usr/src/cmd/ipf/tools/ipmon.c
index 07d3d40be2..a91e23237a 100644
--- a/usr/src/cmd/ipf/tools/ipmon.c
+++ b/usr/src/cmd/ipf/tools/ipmon.c
@@ -6,7 +6,7 @@
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014, Joyent, Inc. All rights reserved.
*/
@@ -80,9 +80,7 @@
#include "netinet/ip_state.h"
#include "netinet/ip_proxy.h"
#include "ipmon.h"
-#if SOLARIS
#include "ipfzone.h"
-#endif
#if !defined(lint)
static const char sccsid[] = "@(#)ipmon.c 1.21 6/5/96 (C)1993-2000 Darren Reed";
@@ -1345,15 +1343,10 @@ printipflog:
static void usage(prog)
char *prog;
{
-#if SOLARIS
- const char *zoneopt = " [-G|-z zonename]";
-#else
- const char *zoneopt = "";
-#endif
- fprintf(stderr, "%s: [-abDFhnpstvxX]%s %s %s %s %s %s %s\n",
- prog, zoneopt, "[-N device]", "[ [-o [NSI]] [-O [NSI]]",
- "[-P pidfile]", "[-S device]", "[-f device]",
- "filename");
+ fprintf(stderr, "%s: [-abDFhnpstvxX] %s %s %s %s %s %s %s\n",
+ prog, "[-G|-z zonename]", "[-N device]",
+ "[ [-o [NSI]] [-O [NSI]]", "[-P pidfile]", "[-S device]",
+ "[-f device]", "filename");
exit(1);
}
@@ -1390,12 +1383,10 @@ FILE *log;
exit(1);
}
-#if SOLARIS
if (setzone(fd) != 0) {
close(fd);
exit(1);
}
-#endif
if (ioctl(fd, SIOCIPFFB, &flushed) == 0) {
printf("%d bytes flushed from log buffer\n",
@@ -1469,13 +1460,11 @@ char *argv[];
iplfile[1] = IPNAT_NAME;
iplfile[2] = IPSTATE_NAME;
-#if SOLARIS
/*
* We need to set the zone name before calling openlog in
* the switch statement below
*/
getzoneopt(argc, argv, optstr);
-#endif
while ((c = getopt(argc, argv, optstr)) != -1)
switch (c)
@@ -1509,11 +1498,9 @@ char *argv[];
flushlogs(iplfile[1], log);
flushlogs(iplfile[2], log);
break;
-#if SOLARIS
case 'G' :
/* Already handled by getzoneopt() above */
break;
-#endif
case 'n' :
opts |= OPT_RESOLVE;
break;
@@ -1566,11 +1553,9 @@ char *argv[];
case 'X' :
opts |= OPT_HEXHDR;
break;
-#if SOLARIS
case 'z' :
/* Already handled by getzoneopt() above */
break;
-#endif
default :
case 'h' :
case '?' :
@@ -1608,12 +1593,11 @@ char *argv[];
/* NOTREACHED */
}
-#if SOLARIS
if (setzone(fd[i]) != 0) {
close(fd[i]);
exit(1);
}
-#endif
+
if (!(regular[i] = !S_ISCHR(sb.st_mode)))
devices++;
}