diff options
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; |