diff options
Diffstat (limited to 'usr/src/cmd/ipf/lib/common/load_poolnode.c')
-rw-r--r-- | usr/src/cmd/ipf/lib/common/load_poolnode.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/src/cmd/ipf/lib/common/load_poolnode.c b/usr/src/cmd/ipf/lib/common/load_poolnode.c index e992a80281..4203f0faa5 100644 --- a/usr/src/cmd/ipf/lib/common/load_poolnode.c +++ b/usr/src/cmd/ipf/lib/common/load_poolnode.c @@ -4,6 +4,8 @@ * See the IPFILTER.LICENCE file for details on licencing. * * $Id: load_poolnode.c,v 1.3.2.1 2004/03/06 14:33:29 darrenr Exp $ + * + * Copyright (c) 2014, Joyent, Inc. All rights reserved. */ #include <fcntl.h> @@ -11,6 +13,7 @@ #include "ipf.h" #include "netinet/ip_lookup.h" #include "netinet/ip_pool.h" +#include "ipfzone.h" static int poolfd = -1; @@ -29,6 +32,10 @@ ioctlfunc_t iocfunc; poolfd = open(IPLOOKUP_NAME, O_RDWR); if ((poolfd == -1) && ((opts & OPT_DONOTHING) == 0)) return -1; + if (setzone(poolfd) != 0) { + close(poolfd); + return -1; + } op.iplo_unit = role; op.iplo_type = IPLT_POOL; |