diff options
author | Rob Gulewich <robert.gulewich@joyent.com> | 2014-09-19 11:47:32 -0700 |
---|---|---|
committer | Robert Mustacchi <rm@joyent.com> | 2014-12-10 18:00:29 -0800 |
commit | 94bdecd9e84ae1042607002db3e64a6849da5874 (patch) | |
tree | a1bcf0ec4c727c916fcdd6b8ef779ee8063a7bfa /usr/src/cmd/ipf/lib/common/load_hashnode.c | |
parent | 0b9f216886fedfeee1db590ff8db3baf72dc9118 (diff) | |
download | illumos-gate-94bdecd9e84ae1042607002db3e64a6849da5874.tar.gz |
5198 Want alternate global zone rule set for each ipf netstack
5197 Global zone should be able to manage NGZ ipf state
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Darren Reed <darrenr@fastmail.net>
Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/cmd/ipf/lib/common/load_hashnode.c')
-rw-r--r-- | usr/src/cmd/ipf/lib/common/load_hashnode.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr/src/cmd/ipf/lib/common/load_hashnode.c b/usr/src/cmd/ipf/lib/common/load_hashnode.c index 8cf1bb2c67..d408d511c2 100644 --- a/usr/src/cmd/ipf/lib/common/load_hashnode.c +++ b/usr/src/cmd/ipf/lib/common/load_hashnode.c @@ -7,15 +7,16 @@ * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2014, Joyent, Inc. All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <fcntl.h> #include <sys/ioctl.h> #include "ipf.h" #include "netinet/ip_lookup.h" #include "netinet/ip_htable.h" +#include "ipfzone.h" static int hashfd = -1; @@ -34,6 +35,10 @@ ioctlfunc_t iocfunc; hashfd = open(IPLOOKUP_NAME, O_RDWR); if ((hashfd == -1) && ((opts & OPT_DONOTHING) == 0)) return -1; + if (setzone(hashfd) != 0) { + close(hashfd); + return -1; + } op.iplo_type = IPLT_HASH; op.iplo_unit = unit; |