vplat.c (543a8da84d26ec70222ecd1638b72c1e6c763275) vplat.c (85dff7a05711e1238299281f8a94d2d40834c775)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2016, Joyent Inc.
24 * Copyright 2018, Joyent Inc.
25 * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
26 * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27 * Copyright 2020 RackTop Systems Inc.
25 * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
26 * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27 * Copyright 2020 RackTop Systems Inc.
28 * Copyright 2023 Oxide Computer Company
28 */
29
30/*
31 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
32 */
33
34/*
35 * This module contains functions used to bring up and tear down the

--- 39 unchanged lines hidden (view full) ---

75#include <sys/utsname.h>
76#include <sys/types.h>
77#include <sys/stat.h>
78#include <sys/sockio.h>
79#include <sys/stropts.h>
80#include <sys/conf.h>
81#include <sys/systeminfo.h>
82#include <sys/secflags.h>
29 */
30
31/*
32 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
33 */
34
35/*
36 * This module contains functions used to bring up and tear down the

--- 39 unchanged lines hidden (view full) ---

76#include <sys/utsname.h>
77#include <sys/types.h>
78#include <sys/stat.h>
79#include <sys/sockio.h>
80#include <sys/stropts.h>
81#include <sys/conf.h>
82#include <sys/systeminfo.h>
83#include <sys/secflags.h>
84#include <sys/vnic.h>
83
84#include <libdlpi.h>
85#include <libdllink.h>
86#include <libdlvlan.h>
85
86#include <libdlpi.h>
87#include <libdllink.h>
88#include <libdlvlan.h>
89#include <libdlvnic.h>
90#include <libdlaggr.h>
87
88#include <inet/tcp.h>
89#include <arpa/inet.h>
90#include <netinet/in.h>
91#include <net/route.h>
92
93#include <stdio.h>
94#include <errno.h>

--- 2918 unchanged lines hidden (view full) ---

3013 }
3014 }
3015 if (prof != NULL)
3016 di_prof_fini(prof);
3017
3018 return (0);
3019}
3020
91
92#include <inet/tcp.h>
93#include <arpa/inet.h>
94#include <netinet/in.h>
95#include <net/route.h>
96
97#include <stdio.h>
98#include <errno.h>

--- 2918 unchanged lines hidden (view full) ---

3017 }
3018 }
3019 if (prof != NULL)
3020 di_prof_fini(prof);
3021
3022 return (0);
3023}
3024
3025/*
3026 * Retrieve the list of datalink IDs assigned to a zone.
3027 *
3028 * On return, *count will be updated with the total number of links and, if it
3029 * is not NULL, **linksp will be updated to point to allocated memory
3030 * containing the link IDs. This should be passed to free() when the caller is
3031 * finished with it.
3032 */
3021static int
3033static int
3034fetch_zone_datalinks(zlog_t *zlogp, zoneid_t zoneid, int *countp,
3035 datalink_id_t **linksp)
3036{
3037 datalink_id_t *links = NULL;
3038 int links_size = 0;
3039 int num_links;
3040
3041 if (linksp != NULL)
3042 *linksp = NULL;
3043 *countp = 0;
3044
3045 num_links = 0;
3046 if (zone_list_datalink(zoneid, &num_links, NULL) != 0) {
3047 zerror(zlogp, B_TRUE,
3048 "unable to determine number of network interfaces");
3049 return (-1);
3050 }
3051
3052 if (num_links == 0)
3053 return (0);
3054
3055 /* If linkp is NULL, the caller only wants the count. */
3056 if (linksp == NULL) {
3057 *countp = num_links;
3058 return (0);
3059 }
3060
3061 do {
3062 datalink_id_t *p;
3063
3064 links_size = num_links;
3065 p = reallocarray(links, links_size, sizeof (datalink_id_t));
3066
3067 if (p == NULL) {
3068 zerror(zlogp, B_TRUE,
3069 "failed to allocate memory for zone links");
3070 free(links);
3071 return (-1);
3072 }
3073 links = p;
3074
3075 if (zone_list_datalink(zoneid, &num_links, links) != 0) {
3076 zerror(zlogp, B_TRUE, "failed to list zone links");
3077 free(links);
3078 return (-1);
3079 }
3080 } while (links_size < num_links);
3081
3082 *countp = num_links;
3083 *linksp = links;
3084
3085 return (0);
3086}
3087
3088static int
3022remove_datalink_pool(zlog_t *zlogp, zoneid_t zoneid)
3023{
3024 ushort_t flags;
3025 zone_iptype_t iptype;
3089remove_datalink_pool(zlog_t *zlogp, zoneid_t zoneid)
3090{
3091 ushort_t flags;
3092 zone_iptype_t iptype;
3026 int i, dlnum = 0;
3027 datalink_id_t *dllink, *dllinks = NULL;
3093 int i;
3028 dladm_status_t err;
3029
3030 if (strlen(pool_name) == 0)
3031 return (0);
3032
3033 if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3034 sizeof (flags)) < 0) {
3035 if (vplat_get_iptype(zlogp, &iptype) < 0) {
3036 zerror(zlogp, B_FALSE, "unable to determine ip-type");
3037 return (-1);
3038 }
3039 } else {
3040 if (flags & ZF_NET_EXCL)
3041 iptype = ZS_EXCLUSIVE;
3042 else
3043 iptype = ZS_SHARED;
3044 }
3045
3046 if (iptype == ZS_EXCLUSIVE) {
3094 dladm_status_t err;
3095
3096 if (strlen(pool_name) == 0)
3097 return (0);
3098
3099 if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3100 sizeof (flags)) < 0) {
3101 if (vplat_get_iptype(zlogp, &iptype) < 0) {
3102 zerror(zlogp, B_FALSE, "unable to determine ip-type");
3103 return (-1);
3104 }
3105 } else {
3106 if (flags & ZF_NET_EXCL)
3107 iptype = ZS_EXCLUSIVE;
3108 else
3109 iptype = ZS_SHARED;
3110 }
3111
3112 if (iptype == ZS_EXCLUSIVE) {
3047 /*
3048 * Get the datalink count and for each datalink,
3049 * attempt to clear the pool property and clear
3050 * the pool_name.
3051 */
3052 if (zone_list_datalink(zoneid, &dlnum, NULL) != 0) {
3053 zerror(zlogp, B_TRUE, "unable to count network "
3054 "interfaces");
3055 return (-1);
3056 }
3113 datalink_id_t *dllinks = NULL;
3114 int dlnum = 0;
3057
3115
3058 if (dlnum == 0)
3059 return (0);
3060
3061 if ((dllinks = malloc(dlnum * sizeof (datalink_id_t)))
3062 == NULL) {
3063 zerror(zlogp, B_TRUE, "memory allocation failed");
3116 if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
3064 return (-1);
3117 return (-1);
3065 }
3066 if (zone_list_datalink(zoneid, &dlnum, dllinks) != 0) {
3067 zerror(zlogp, B_TRUE, "unable to list network "
3068 "interfaces");
3069 return (-1);
3070 }
3071
3072 bzero(pool_name, sizeof (pool_name));
3118
3119 bzero(pool_name, sizeof (pool_name));
3073 for (i = 0, dllink = dllinks; i < dlnum; i++, dllink++) {
3074 err = dladm_set_linkprop(dld_handle, *dllink, "pool",
3120 for (i = 0; i < dlnum; i++) {
3121 err = dladm_set_linkprop(dld_handle, dllinks[i], "pool",
3075 NULL, 0, DLADM_OPT_ACTIVE);
3076 if (err != DLADM_STATUS_OK) {
3077 zerror(zlogp, B_TRUE,
3078 "WARNING: unable to clear pool");
3079 }
3080 }
3081 free(dllinks);
3082 }
3083 return (0);
3084}
3085
3086static int
3087remove_datalink_protect(zlog_t *zlogp, zoneid_t zoneid)
3088{
3089 ushort_t flags;
3090 zone_iptype_t iptype;
3091 int i, dlnum = 0;
3092 dladm_status_t dlstatus;
3122 NULL, 0, DLADM_OPT_ACTIVE);
3123 if (err != DLADM_STATUS_OK) {
3124 zerror(zlogp, B_TRUE,
3125 "WARNING: unable to clear pool");
3126 }
3127 }
3128 free(dllinks);
3129 }
3130 return (0);
3131}
3132
3133static int
3134remove_datalink_protect(zlog_t *zlogp, zoneid_t zoneid)
3135{
3136 ushort_t flags;
3137 zone_iptype_t iptype;
3138 int i, dlnum = 0;
3139 dladm_status_t dlstatus;
3093 datalink_id_t *dllink, *dllinks = NULL;
3140 datalink_id_t *dllinks = NULL;
3094
3095 if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3096 sizeof (flags)) < 0) {
3097 if (vplat_get_iptype(zlogp, &iptype) < 0) {
3098 zerror(zlogp, B_FALSE, "unable to determine ip-type");
3099 return (-1);
3100 }
3101 } else {
3102 if (flags & ZF_NET_EXCL)
3103 iptype = ZS_EXCLUSIVE;
3104 else
3105 iptype = ZS_SHARED;
3106 }
3107
3108 if (iptype != ZS_EXCLUSIVE)
3109 return (0);
3110
3111 /*
3141
3142 if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3143 sizeof (flags)) < 0) {
3144 if (vplat_get_iptype(zlogp, &iptype) < 0) {
3145 zerror(zlogp, B_FALSE, "unable to determine ip-type");
3146 return (-1);
3147 }
3148 } else {
3149 if (flags & ZF_NET_EXCL)
3150 iptype = ZS_EXCLUSIVE;
3151 else
3152 iptype = ZS_SHARED;
3153 }
3154
3155 if (iptype != ZS_EXCLUSIVE)
3156 return (0);
3157
3158 /*
3112 * Get the datalink count and for each datalink,
3113 * attempt to clear the pool property and clear
3114 * the pool_name.
3159 * Get the datalink count and for each datalink, attempt to clear the
3160 * protection and allowed_ips properties.
3115 */
3161 */
3116 if (zone_list_datalink(zoneid, &dlnum, NULL) != 0) {
3117 zerror(zlogp, B_TRUE, "unable to count network interfaces");
3118 return (-1);
3119 }
3120
3162
3121 if (dlnum == 0)
3122 return (0);
3123
3124 if ((dllinks = malloc(dlnum * sizeof (datalink_id_t))) == NULL) {
3125 zerror(zlogp, B_TRUE, "memory allocation failed");
3163 if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
3126 return (-1);
3164 return (-1);
3127 }
3128 if (zone_list_datalink(zoneid, &dlnum, dllinks) != 0) {
3129 zerror(zlogp, B_TRUE, "unable to list network interfaces");
3130 free(dllinks);
3131 return (-1);
3132 }
3133
3165
3134 for (i = 0, dllink = dllinks; i < dlnum; i++, dllink++) {
3166 for (i = 0; i < dlnum; i++) {
3135 char dlerr[DLADM_STRSIZE];
3136
3167 char dlerr[DLADM_STRSIZE];
3168
3137 dlstatus = dladm_set_linkprop(dld_handle, *dllink,
3169 dlstatus = dladm_set_linkprop(dld_handle, dllinks[i],
3138 "protection", NULL, 0, DLADM_OPT_ACTIVE);
3139 if (dlstatus == DLADM_STATUS_NOTFOUND) {
3140 /* datalink does not belong to the GZ */
3141 continue;
3142 }
3143 if (dlstatus != DLADM_STATUS_OK) {
3144 zerror(zlogp, B_FALSE,
3170 "protection", NULL, 0, DLADM_OPT_ACTIVE);
3171 if (dlstatus == DLADM_STATUS_NOTFOUND) {
3172 /* datalink does not belong to the GZ */
3173 continue;
3174 }
3175 if (dlstatus != DLADM_STATUS_OK) {
3176 zerror(zlogp, B_FALSE,
3145 dladm_status2str(dlstatus, dlerr));
3146 free(dllinks);
3147 return (-1);
3177 "clear link %d 'protection' link property: %s",
3178 dllinks[i], dladm_status2str(dlstatus, dlerr));
3148 }
3179 }
3149 dlstatus = dladm_set_linkprop(dld_handle, *dllink,
3180
3181 dlstatus = dladm_set_linkprop(dld_handle, dllinks[i],
3150 "allowed-ips", NULL, 0, DLADM_OPT_ACTIVE);
3151 if (dlstatus != DLADM_STATUS_OK) {
3152 zerror(zlogp, B_FALSE,
3182 "allowed-ips", NULL, 0, DLADM_OPT_ACTIVE);
3183 if (dlstatus != DLADM_STATUS_OK) {
3184 zerror(zlogp, B_FALSE,
3153 dladm_status2str(dlstatus, dlerr));
3154 free(dllinks);
3155 return (-1);
3185 "clear link %d 'allowed-ips' link property: %s",
3186 dllinks[i], dladm_status2str(dlstatus, dlerr));
3156 }
3157 }
3158 free(dllinks);
3159 return (0);
3160}
3161
3162static int
3163unconfigure_exclusive_network_interfaces(zlog_t *zlogp, zoneid_t zoneid)
3164{
3187 }
3188 }
3189 free(dllinks);
3190 return (0);
3191}
3192
3193static int
3194unconfigure_exclusive_network_interfaces(zlog_t *zlogp, zoneid_t zoneid)
3195{
3196 datalink_id_t *dllinks;
3165 int dlnum = 0;
3197 int dlnum = 0;
3198 uint_t i;
3166
3167 /*
3168 * The kernel shutdown callback for the dls module should have removed
3169 * all datalinks from this zone. If any remain, then there's a
3170 * problem.
3171 */
3199
3200 /*
3201 * The kernel shutdown callback for the dls module should have removed
3202 * all datalinks from this zone. If any remain, then there's a
3203 * problem.
3204 */
3172 if (zone_list_datalink(zoneid, &dlnum, NULL) != 0) {
3173 zerror(zlogp, B_TRUE, "unable to list network interfaces");
3205
3206 if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
3174 return (-1);
3207 return (-1);
3208
3209 if (dlnum == 0)
3210 return (0);
3211
3212 /*
3213 * There are some datalinks left in the zone. The most likely cause of
3214 * this is that the datalink-management daemon (dlmgmtd) was not
3215 * running when the zone was shut down. That prevented the kernel from
3216 * doing the required upcall to move the links back to the GZ. To
3217 * attempt recovery, do that now.
3218 */
3219
3220 for (i = 0; i < dlnum; i++) {
3221 char dlerr[DLADM_STRSIZE];
3222 dladm_status_t status;
3223 uint32_t link_flags;
3224 datalink_id_t link = dllinks[i];
3225 char *prop_vals[] = { GLOBAL_ZONENAME };
3226
3227 status = dladm_datalink_id2info(dld_handle, link,
3228 &link_flags, NULL, NULL, NULL, 0);
3229
3230 if (status != DLADM_STATUS_OK) {
3231 zerror(zlogp, B_FALSE,
3232 "failed to get link info for %u: %s",
3233 link, dladm_status2str(status, dlerr));
3234 continue;
3235 }
3236
3237 if (link_flags & DLADM_OPT_TRANSIENT)
3238 continue;
3239
3240 status = dladm_set_linkprop(dld_handle, link, "zone",
3241 prop_vals, 1, DLADM_OPT_ACTIVE);
3242
3243 if (status != DLADM_STATUS_OK) {
3244 zerror(zlogp, B_FALSE,
3245 "failed to move link %u to GZ: %s",
3246 link, dladm_status2str(status, dlerr));
3247 }
3175 }
3248 }
3176 if (dlnum != 0) {
3177 zerror(zlogp, B_FALSE,
3178 "datalinks remain in zone after shutdown");
3249
3250 free(dllinks);
3251
3252 /* Check again and log a message if links remain */
3253
3254 if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, NULL) != 0)
3179 return (-1);
3255 return (-1);
3180 }
3181 return (0);
3256
3257 if (dlnum == 0)
3258 return (0);
3259
3260 zerror(zlogp, B_FALSE, "%d datalink(s) remain in zone after shutdown",
3261 dlnum);
3262
3263 return (-1);
3182}
3183
3184static int
3185tcp_abort_conn(zlog_t *zlogp, zoneid_t zoneid,
3186 const struct sockaddr_storage *local, const struct sockaddr_storage *remote)
3187{
3188 int fd;
3189 struct strioctl ioc;

--- 2079 unchanged lines hidden (view full) ---

5269 retv = 0;
5270 zonecfg_close_scratch(fp);
5271 return (retv);
5272 } else {
5273 return (0);
5274 }
5275}
5276
3264}
3265
3266static int
3267tcp_abort_conn(zlog_t *zlogp, zoneid_t zoneid,
3268 const struct sockaddr_storage *local, const struct sockaddr_storage *remote)
3269{
3270 int fd;
3271 struct strioctl ioc;

--- 2079 unchanged lines hidden (view full) ---

5351 retv = 0;
5352 zonecfg_close_scratch(fp);
5353 return (retv);
5354 } else {
5355 return (0);
5356 }
5357}
5358
5359/*
5360 * Delete all transient links belonging to this zone. A transient link
5361 * is one that is created and destroyed along with the lifetime of the
5362 * zone. Non-transient links, ones that are assigned from the GZ to a
5363 * NGZ, are reassigned to the GZ in zone_shutdown() via the
5364 * zone-specific data (zsd) callbacks.
5365 */
5366static int
5367delete_transient_links(zlog_t *zlogp, zoneid_t zoneid)
5368{
5369 datalink_id_t *dllinks = NULL;
5370 int dlnum = 0;
5371 uint_t i;
5372
5373 if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
5374 return (-1);
5375
5376 if (dlnum == 0)
5377 return (0);
5378
5379 for (i = 0; i < dlnum; i++) {
5380 char link_name[MAXLINKNAMELEN];
5381 char dlerr[DLADM_STRSIZE];
5382 datalink_id_t link = dllinks[i];
5383 datalink_class_t link_class;
5384 dladm_status_t status;
5385 uint32_t link_flags;
5386
5387 status = dladm_datalink_id2info(dld_handle, link, &link_flags,
5388 &link_class, NULL, link_name, sizeof (link_name));
5389
5390 if (status != DLADM_STATUS_OK) {
5391 zerror(zlogp, B_FALSE,
5392 "failed to get link info for %u: %s",
5393 link, dladm_status2str(status, dlerr));
5394 continue;
5395 }
5396
5397 if (!(link_flags & DLADM_OPT_TRANSIENT))
5398 continue;
5399
5400 switch (link_class) {
5401 case DATALINK_CLASS_VNIC:
5402 case DATALINK_CLASS_ETHERSTUB:
5403 status = dladm_vnic_delete(dld_handle, link,
5404 DLADM_OPT_ACTIVE);
5405 break;
5406 case DATALINK_CLASS_VLAN:
5407 status = dladm_vlan_delete(dld_handle, link,
5408 DLADM_OPT_ACTIVE);
5409 break;
5410 case DATALINK_CLASS_AGGR:
5411 status = dladm_aggr_delete(dld_handle, link,
5412 DLADM_OPT_ACTIVE);
5413 break;
5414 default:
5415 zerror(zlogp, B_FALSE,
5416 "unhandled class for transient link %s (%u)",
5417 link_name, link);
5418 continue;
5419 }
5420
5421 if (status != DLADM_STATUS_OK) {
5422 zerror(zlogp, B_TRUE,
5423 "failed to delete transient link %s (%u): %s",
5424 link_name, link, dladm_status2str(status, dlerr));
5425 }
5426 }
5427
5428 free(dllinks);
5429 return (0);
5430}
5431
5277int
5278vplat_teardown(zlog_t *zlogp, boolean_t unmount_cmd, boolean_t rebooting)
5279{
5280 char *kzone;
5281 zoneid_t zoneid;
5282 int res;
5283 char pool_err[128];
5284 char zpath[MAXPATHLEN];

--- 25 unchanged lines hidden (view full) ---

5310 if (!bringup_failure_recovery)
5311 zerror(zlogp, B_TRUE, "unable to get zoneid");
5312 if (unmount_cmd)
5313 (void) lu_root_teardown(zlogp);
5314 goto error;
5315 }
5316
5317 if (remove_datalink_pool(zlogp, zoneid) != 0) {
5432int
5433vplat_teardown(zlog_t *zlogp, boolean_t unmount_cmd, boolean_t rebooting)
5434{
5435 char *kzone;
5436 zoneid_t zoneid;
5437 int res;
5438 char pool_err[128];
5439 char zpath[MAXPATHLEN];

--- 25 unchanged lines hidden (view full) ---

5465 if (!bringup_failure_recovery)
5466 zerror(zlogp, B_TRUE, "unable to get zoneid");
5467 if (unmount_cmd)
5468 (void) lu_root_teardown(zlogp);
5469 goto error;
5470 }
5471
5472 if (remove_datalink_pool(zlogp, zoneid) != 0) {
5318 zerror(zlogp, B_FALSE, "unable clear datalink pool property");
5319 goto error;
5473 zerror(zlogp, B_FALSE,
5474 "unable to clear datalink pool property");
5320 }
5321
5322 if (remove_datalink_protect(zlogp, zoneid) != 0) {
5323 zerror(zlogp, B_FALSE,
5475 }
5476
5477 if (remove_datalink_protect(zlogp, zoneid) != 0) {
5478 zerror(zlogp, B_FALSE,
5324 "unable clear datalink protect property");
5325 goto error;
5479 "unable to clear datalink protect property");
5326 }
5327
5328 /*
5329 * The datalinks assigned to the zone will be removed from the NGZ as
5330 * part of zone_shutdown() so that we need to remove protect/pool etc.
5331 * before zone_shutdown(). Even if the shutdown itself fails, the zone
5332 * will not be able to violate any constraints applied because the
5333 * datalinks are no longer available to the zone.

--- 56 unchanged lines hidden (view full) ---

5390 if (unconfigure_shared_network_interfaces(zlogp,
5391 zoneid) != 0) {
5392 zerror(zlogp, B_FALSE, "unable to unconfigure "
5393 "network interfaces in zone");
5394 goto error;
5395 }
5396 break;
5397 case ZS_EXCLUSIVE:
5480 }
5481
5482 /*
5483 * The datalinks assigned to the zone will be removed from the NGZ as
5484 * part of zone_shutdown() so that we need to remove protect/pool etc.
5485 * before zone_shutdown(). Even if the shutdown itself fails, the zone
5486 * will not be able to violate any constraints applied because the
5487 * datalinks are no longer available to the zone.

--- 56 unchanged lines hidden (view full) ---

5544 if (unconfigure_shared_network_interfaces(zlogp,
5545 zoneid) != 0) {
5546 zerror(zlogp, B_FALSE, "unable to unconfigure "
5547 "network interfaces in zone");
5548 goto error;
5549 }
5550 break;
5551 case ZS_EXCLUSIVE:
5552 if (delete_transient_links(zlogp, zoneid) != 0) {
5553 zerror(zlogp, B_FALSE, "unable to delete "
5554 "transient links in zone");
5555 goto error;
5556 }
5398 if (unconfigure_exclusive_network_interfaces(zlogp,
5399 zoneid) != 0) {
5400 zerror(zlogp, B_FALSE, "unable to unconfigure "
5401 "network interfaces in zone");
5402 goto error;
5403 }
5404 status = dladm_zone_halt(dld_handle, zoneid);
5405 if (status != DLADM_STATUS_OK) {

--- 74 unchanged lines hidden ---
5557 if (unconfigure_exclusive_network_interfaces(zlogp,
5558 zoneid) != 0) {
5559 zerror(zlogp, B_FALSE, "unable to unconfigure "
5560 "network interfaces in zone");
5561 goto error;
5562 }
5563 status = dladm_zone_halt(dld_handle, zoneid);
5564 if (status != DLADM_STATUS_OK) {

--- 74 unchanged lines hidden ---