Print this page
usr/src/cmd/dlmgmtd/dlmgmt_door.c

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/zoneadmd/vplat.c
          +++ new/usr/src/cmd/zoneadmd/vplat.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2018, Joyent Inc.
  25   25   * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
  26   26   * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
  27   27   * Copyright 2020 RackTop Systems Inc.
       28 + * Copyright 2023 Oxide Computer Company
  28   29   */
  29   30  
  30   31  /*
  31   32   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  32   33   */
  33   34  
  34   35  /*
  35   36   * This module contains functions used to bring up and tear down the
  36   37   * Virtual Platform: [un]mounting file-systems, [un]plumbing network
  37   38   * interfaces, [un]configuring devices, establishing resource controls,
↓ open down ↓ 41 lines elided ↑ open up ↑
  79   80  #include <sys/stropts.h>
  80   81  #include <sys/conf.h>
  81   82  #include <sys/systeminfo.h>
  82   83  #include <sys/secflags.h>
  83   84  #include <sys/vnic.h>
  84   85  
  85   86  #include <libdlpi.h>
  86   87  #include <libdllink.h>
  87   88  #include <libdlvlan.h>
  88   89  #include <libdlvnic.h>
       90 +#include <libdlaggr.h>
  89   91  
  90   92  #include <inet/tcp.h>
  91   93  #include <arpa/inet.h>
  92   94  #include <netinet/in.h>
  93   95  #include <net/route.h>
  94   96  
  95   97  #include <stdio.h>
  96   98  #include <errno.h>
  97   99  #include <fcntl.h>
  98  100  #include <unistd.h>
↓ open down ↓ 2922 lines elided ↑ open up ↑
3021 3023                          zerror(zlogp, B_TRUE, "failed to commit profile");
3022 3024                          return (-1);
3023 3025                  }
3024 3026          }
3025 3027          if (prof != NULL)
3026 3028                  di_prof_fini(prof);
3027 3029  
3028 3030          return (0);
3029 3031  }
3030 3032  
     3033 +/*
     3034 + * Retrieve the list of datalink IDs assigned to a zone.
     3035 + *
     3036 + * On return, *count will be updated with the total number of links and, if it
     3037 + * is not NULL, **linksp will be updated to point to allocated memory
     3038 + * containing the link IDs. This should be passed to free() when the caller is
     3039 + * finished with it.
     3040 + */
3031 3041  static int
     3042 +fetch_zone_datalinks(zlog_t *zlogp, zoneid_t zoneid, int *countp,
     3043 +    datalink_id_t **linksp)
     3044 +{
     3045 +        datalink_id_t *links = NULL;
     3046 +        int links_size = 0;
     3047 +        int num_links;
     3048 +
     3049 +        if (linksp != NULL)
     3050 +                *linksp = NULL;
     3051 +        *countp = 0;
     3052 +
     3053 +        num_links = 0;
     3054 +        if (zone_list_datalink(zoneid, &num_links, NULL) != 0) {
     3055 +                zerror(zlogp, B_TRUE,
     3056 +                    "unable to determine number of network interfaces");
     3057 +                return (-1);
     3058 +        }
     3059 +
     3060 +        if (num_links == 0)
     3061 +                return (0);
     3062 +
     3063 +        /* If linkp is NULL, the caller only wants the count. */
     3064 +        if (linksp == NULL) {
     3065 +                *countp = num_links;
     3066 +                return (0);
     3067 +        }
     3068 +
     3069 +        do {
     3070 +                datalink_id_t *p;
     3071 +
     3072 +                links_size = num_links;
     3073 +                p = reallocarray(links, links_size, sizeof (datalink_id_t));
     3074 +
     3075 +                if (p == NULL) {
     3076 +                        zerror(zlogp, B_TRUE,
     3077 +                            "failed to allocate memory for zone links");
     3078 +                        free(links);
     3079 +                        return (-1);
     3080 +                }
     3081 +                links = p;
     3082 +
     3083 +                if (zone_list_datalink(zoneid, &num_links, links) != 0) {
     3084 +                        zerror(zlogp, B_TRUE, "failed to list zone links");
     3085 +                        free(links);
     3086 +                        return (-1);
     3087 +                }
     3088 +        } while (links_size < num_links);
     3089 +
     3090 +        *countp = num_links;
     3091 +        *linksp = links;
     3092 +
     3093 +        return (0);
     3094 +}
     3095 +
     3096 +static int
3032 3097  remove_datalink_pool(zlog_t *zlogp, zoneid_t zoneid)
3033 3098  {
3034 3099          ushort_t flags;
3035 3100          zone_iptype_t iptype;
3036      -        int i, dlnum = 0;
3037      -        datalink_id_t *dllink, *dllinks = NULL;
     3101 +        int i;
3038 3102          dladm_status_t err;
3039 3103  
3040 3104          if (strlen(pool_name) == 0)
3041 3105                  return (0);
3042 3106  
3043 3107          if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3044 3108              sizeof (flags)) < 0) {
3045 3109                  if (vplat_get_iptype(zlogp, &iptype) < 0) {
3046 3110                          zerror(zlogp, B_FALSE, "unable to determine ip-type");
3047 3111                          return (-1);
3048 3112                  }
3049 3113          } else {
3050 3114                  if (flags & ZF_NET_EXCL)
3051 3115                          iptype = ZS_EXCLUSIVE;
3052 3116                  else
3053 3117                          iptype = ZS_SHARED;
3054 3118          }
3055 3119  
3056 3120          if (iptype == ZS_EXCLUSIVE) {
3057      -                /*
3058      -                 * Get the datalink count and for each datalink,
3059      -                 * attempt to clear the pool property and clear
3060      -                 * the pool_name.
3061      -                 */
3062      -                if (zone_list_datalink(zoneid, &dlnum, NULL) != 0) {
3063      -                        zerror(zlogp, B_TRUE, "unable to count network "
3064      -                            "interfaces");
3065      -                        return (-1);
3066      -                }
     3121 +                datalink_id_t *dllinks = NULL;
     3122 +                int dlnum = 0;
3067 3123  
3068      -                if (dlnum == 0)
3069      -                        return (0);
3070      -
3071      -                if ((dllinks = malloc(dlnum * sizeof (datalink_id_t)))
3072      -                    == NULL) {
3073      -                        zerror(zlogp, B_TRUE, "memory allocation failed");
     3124 +                if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
3074 3125                          return (-1);
3075      -                }
3076      -                if (zone_list_datalink(zoneid, &dlnum, dllinks) != 0) {
3077      -                        zerror(zlogp, B_TRUE, "unable to list network "
3078      -                            "interfaces");
3079      -                        return (-1);
3080      -                }
3081 3126  
3082 3127                  bzero(pool_name, sizeof (pool_name));
3083      -                for (i = 0, dllink = dllinks; i < dlnum; i++, dllink++) {
3084      -                        err = dladm_set_linkprop(dld_handle, *dllink, "pool",
     3128 +                for (i = 0; i < dlnum; i++) {
     3129 +                        err = dladm_set_linkprop(dld_handle, dllinks[i], "pool",
3085 3130                              NULL, 0, DLADM_OPT_ACTIVE);
3086 3131                          if (err != DLADM_STATUS_OK) {
3087 3132                                  zerror(zlogp, B_TRUE,
3088 3133                                      "WARNING: unable to clear pool");
3089 3134                          }
3090 3135                  }
3091 3136                  free(dllinks);
3092 3137          }
3093 3138          return (0);
3094 3139  }
3095 3140  
3096 3141  static int
3097 3142  remove_datalink_protect(zlog_t *zlogp, zoneid_t zoneid)
3098 3143  {
3099 3144          ushort_t flags;
3100 3145          zone_iptype_t iptype;
3101 3146          int i, dlnum = 0;
3102 3147          dladm_status_t dlstatus;
3103      -        datalink_id_t *dllink, *dllinks = NULL;
     3148 +        datalink_id_t *dllinks = NULL;
3104 3149  
3105 3150          if (zone_getattr(zoneid, ZONE_ATTR_FLAGS, &flags,
3106 3151              sizeof (flags)) < 0) {
3107 3152                  if (vplat_get_iptype(zlogp, &iptype) < 0) {
3108 3153                          zerror(zlogp, B_FALSE, "unable to determine ip-type");
3109 3154                          return (-1);
3110 3155                  }
3111 3156          } else {
3112 3157                  if (flags & ZF_NET_EXCL)
3113 3158                          iptype = ZS_EXCLUSIVE;
3114 3159                  else
3115 3160                          iptype = ZS_SHARED;
3116 3161          }
3117 3162  
3118 3163          if (iptype != ZS_EXCLUSIVE)
3119 3164                  return (0);
3120 3165  
3121 3166          /*
3122      -         * Get the datalink count and for each datalink,
3123      -         * attempt to clear the pool property and clear
3124      -         * the pool_name.
     3167 +         * Get the datalink count and for each datalink, attempt to clear the
     3168 +         * protection and allowed_ips properties.
3125 3169           */
3126      -        if (zone_list_datalink(zoneid, &dlnum, NULL) != 0) {
3127      -                zerror(zlogp, B_TRUE, "unable to count network interfaces");
3128      -                return (-1);
3129      -        }
3130 3170  
3131      -        if (dlnum == 0)
3132      -                return (0);
3133      -
3134      -        if ((dllinks = malloc(dlnum * sizeof (datalink_id_t))) == NULL) {
3135      -                zerror(zlogp, B_TRUE, "memory allocation failed");
     3171 +        if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
3136 3172                  return (-1);
3137      -        }
3138      -        if (zone_list_datalink(zoneid, &dlnum, dllinks) != 0) {
3139      -                zerror(zlogp, B_TRUE, "unable to list network interfaces");
3140      -                free(dllinks);
3141      -                return (-1);
3142      -        }
3143 3173  
3144      -        for (i = 0, dllink = dllinks; i < dlnum; i++, dllink++) {
     3174 +        for (i = 0; i < dlnum; i++) {
3145 3175                  char dlerr[DLADM_STRSIZE];
3146 3176  
3147      -                dlstatus = dladm_set_linkprop(dld_handle, *dllink,
     3177 +                dlstatus = dladm_set_linkprop(dld_handle, dllinks[i],
3148 3178                      "protection", NULL, 0, DLADM_OPT_ACTIVE);
3149 3179                  if (dlstatus == DLADM_STATUS_NOTFOUND) {
3150 3180                          /* datalink does not belong to the GZ */
3151 3181                          continue;
3152 3182                  }
3153      -                if (dlstatus != DLADM_STATUS_OK)
     3183 +                if (dlstatus != DLADM_STATUS_OK) {
3154 3184                          zerror(zlogp, B_FALSE,
3155      -                            "clear 'protection' link property: %s",
3156      -                            dladm_status2str(dlstatus, dlerr));
     3185 +                            "clear link %d 'protection' link property: %s",
     3186 +                            dllinks[i], dladm_status2str(dlstatus, dlerr));
     3187 +                }
3157 3188  
3158      -                dlstatus = dladm_set_linkprop(dld_handle, *dllink,
     3189 +                dlstatus = dladm_set_linkprop(dld_handle, dllinks[i],
3159 3190                      "allowed-ips", NULL, 0, DLADM_OPT_ACTIVE);
3160      -                if (dlstatus != DLADM_STATUS_OK)
     3191 +                if (dlstatus != DLADM_STATUS_OK) {
3161 3192                          zerror(zlogp, B_FALSE,
3162      -                            "clear 'allowed-ips' link property: %s",
3163      -                            dladm_status2str(dlstatus, dlerr));
     3193 +                            "clear link %d 'allowed-ips' link property: %s",
     3194 +                            dllinks[i], dladm_status2str(dlstatus, dlerr));
     3195 +                }
3164 3196          }
3165 3197          free(dllinks);
3166 3198          return (0);
3167 3199  }
3168 3200  
3169 3201  static int
     3202 +unconfigure_exclusive_network_interfaces(zlog_t *zlogp, zoneid_t zoneid)
     3203 +{
     3204 +        datalink_id_t *dllinks;
     3205 +        int dlnum = 0;
     3206 +        uint_t i;
     3207 +
     3208 +        /*
     3209 +         * The kernel shutdown callback for the dls module should have removed
     3210 +         * all datalinks from this zone.  If any remain, then there's a
     3211 +         * problem.
     3212 +         */
     3213 +
     3214 +        if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
     3215 +                return (-1);
     3216 +
     3217 +        if (dlnum == 0)
     3218 +                return (0);
     3219 +
     3220 +        /*
     3221 +         * There are some datalinks left in the zone. The most likely cause of
     3222 +         * this is that the datalink-management daemon (dlmgmtd) was not
     3223 +         * running when the zone was shut down. That prevented the kernel from
     3224 +         * doing the required upcall to move the links back to the GZ. To
     3225 +         * attempt recovery, do that now.
     3226 +         */
     3227 +
     3228 +        for (i = 0; i < dlnum; i++) {
     3229 +                char dlerr[DLADM_STRSIZE];
     3230 +                dladm_status_t status;
     3231 +                uint32_t link_flags;
     3232 +                datalink_id_t link = dllinks[i];
     3233 +                char *prop_vals[] = { GLOBAL_ZONENAME };
     3234 +
     3235 +                status = dladm_datalink_id2info(dld_handle, link,
     3236 +                    &link_flags, NULL, NULL, NULL, 0);
     3237 +
     3238 +                if (status != DLADM_STATUS_OK) {
     3239 +                        zerror(zlogp, B_FALSE,
     3240 +                            "failed to get link info for %u: %s",
     3241 +                            link, dladm_status2str(status, dlerr));
     3242 +                        continue;
     3243 +                }
     3244 +
     3245 +                if (link_flags & DLADM_OPT_TRANSIENT)
     3246 +                        continue;
     3247 +
     3248 +                status = dladm_set_linkprop(dld_handle, link, "zone",
     3249 +                    prop_vals, 1, DLADM_OPT_ACTIVE);
     3250 +
     3251 +                if (status != DLADM_STATUS_OK) {
     3252 +                        zerror(zlogp, B_FALSE,
     3253 +                            "failed to move link %u to GZ: %s",
     3254 +                            link, dladm_status2str(status, dlerr));
     3255 +                }
     3256 +        }
     3257 +
     3258 +        free(dllinks);
     3259 +
     3260 +        /* Check again and log a message if links remain */
     3261 +
     3262 +        if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, NULL) != 0)
     3263 +                return (-1);
     3264 +
     3265 +        if (dlnum == 0)
     3266 +                return (0);
     3267 +
     3268 +        zerror(zlogp, B_FALSE, "%d datalink(s) remain in zone after shutdown",
     3269 +            dlnum);
     3270 +
     3271 +        return (-1);
     3272 +}
     3273 +
     3274 +static int
3170 3275  tcp_abort_conn(zlog_t *zlogp, zoneid_t zoneid,
3171 3276      const struct sockaddr_storage *local, const struct sockaddr_storage *remote)
3172 3277  {
3173 3278          int fd;
3174 3279          struct strioctl ioc;
3175 3280          tcp_ioc_abort_conn_t conn;
3176 3281          int error;
3177 3282  
3178 3283          conn.ac_local = *local;
3179 3284          conn.ac_remote = *remote;
↓ open down ↓ 2028 lines elided ↑ open up ↑
5208 5313                  else
5209 5314                          retv = 0;
5210 5315                  zonecfg_close_scratch(fp);
5211 5316                  return (retv);
5212 5317          } else {
5213 5318                  return (0);
5214 5319          }
5215 5320  }
5216 5321  
5217 5322  /*
5218      - * Delete all transient VNICs belonging to this zone. A transient VNIC
     5323 + * Delete all transient links belonging to this zone. A transient link
5219 5324   * is one that is created and destroyed along with the lifetime of the
5220      - * zone. Non-transient VNICs, ones that are assigned from the GZ to a
     5325 + * zone. Non-transient links, ones that are assigned from the GZ to a
5221 5326   * NGZ, are reassigned to the GZ in zone_shutdown() via the
5222 5327   * zone-specific data (zsd) callbacks.
5223 5328   */
5224 5329  static int
5225      -delete_transient_vnics(zlog_t *zlogp, zoneid_t zoneid)
     5330 +delete_transient_links(zlog_t *zlogp, zoneid_t zoneid)
5226 5331  {
5227      -        dladm_status_t status;
5228      -        int num_links = 0;
5229      -        datalink_id_t *links, link;
5230      -        uint32_t link_flags;
5231      -        datalink_class_t link_class;
5232      -        char link_name[MAXLINKNAMELEN];
     5332 +        datalink_id_t *dllinks = NULL;
     5333 +        int dlnum = 0;
     5334 +        uint_t i;
5233 5335  
5234      -        if (zone_list_datalink(zoneid, &num_links, NULL) != 0) {
5235      -                zerror(zlogp, B_TRUE, "unable to determine "
5236      -                    "number of network interfaces");
     5336 +        if (fetch_zone_datalinks(zlogp, zoneid, &dlnum, &dllinks) != 0)
5237 5337                  return (-1);
5238      -        }
5239 5338  
5240      -        if (num_links == 0)
     5339 +        if (dlnum == 0)
5241 5340                  return (0);
5242 5341  
5243      -        links = malloc(num_links * sizeof (datalink_id_t));
5244      -
5245      -        if (links == NULL) {
5246      -                zerror(zlogp, B_TRUE, "failed to delete "
5247      -                    "network interfaces because of alloc fail");
5248      -                return (-1);
5249      -        }
5250      -
5251      -        if (zone_list_datalink(zoneid, &num_links, links) != 0) {
5252      -                zerror(zlogp, B_TRUE, "failed to delete "
5253      -                    "network interfaces because of failure "
5254      -                    "to list them");
5255      -                return (-1);
5256      -        }
5257      -
5258      -        for (int i = 0; i < num_links; i++) {
     5342 +        for (i = 0; i < dlnum; i++) {
     5343 +                char link_name[MAXLINKNAMELEN];
5259 5344                  char dlerr[DLADM_STRSIZE];
5260      -                link = links[i];
     5345 +                datalink_id_t link = dllinks[i];
     5346 +                datalink_class_t link_class;
     5347 +                dladm_status_t status;
     5348 +                uint32_t link_flags;
5261 5349  
5262 5350                  status = dladm_datalink_id2info(dld_handle, link, &link_flags,
5263 5351                      &link_class, NULL, link_name, sizeof (link_name));
5264 5352  
5265 5353                  if (status != DLADM_STATUS_OK) {
5266      -                        zerror(zlogp, B_FALSE, "failed to "
5267      -                            "delete network interface (%u)"
5268      -                            "due to failure to get link info: %s",
5269      -                            link,
5270      -                            dladm_status2str(status, dlerr));
5271      -                        return (-1);
     5354 +                        zerror(zlogp, B_FALSE,
     5355 +                            "failed to get link info for %u: %s",
     5356 +                            link, dladm_status2str(status, dlerr));
     5357 +                        continue;
5272 5358                  }
5273 5359  
5274      -                if (link_flags & DLADM_OPT_TRANSIENT) {
5275      -                        assert(link_class & DATALINK_CLASS_VNIC);
     5360 +                if (!(link_flags & DLADM_OPT_TRANSIENT))
     5361 +                        continue;
     5362 +
     5363 +                switch (link_class) {
     5364 +                case DATALINK_CLASS_VNIC:
     5365 +                case DATALINK_CLASS_ETHERSTUB:
5276 5366                          status = dladm_vnic_delete(dld_handle, link,
5277 5367                              DLADM_OPT_ACTIVE);
     5368 +                        break;
     5369 +                case DATALINK_CLASS_VLAN:
     5370 +                        status = dladm_vlan_delete(dld_handle, link,
     5371 +                            DLADM_OPT_ACTIVE);
     5372 +                        break;
     5373 +                case DATALINK_CLASS_AGGR:
     5374 +                        status = dladm_aggr_delete(dld_handle, link,
     5375 +                            DLADM_OPT_ACTIVE);
     5376 +                        break;
     5377 +                default:
     5378 +                        zerror(zlogp, B_FALSE,
     5379 +                            "unhandled class for transient link %s (%u)",
     5380 +                            link_name, link);
     5381 +                        continue;
     5382 +                }
5278 5383  
5279      -                        if (status != DLADM_STATUS_OK) {
5280      -                                zerror(zlogp, B_TRUE, "failed to delete link "
5281      -                                    "with id %d: %s", link,
5282      -                                    dladm_status2str(status, dlerr));
5283      -                                return (-1);
5284      -                        }
     5384 +                if (status != DLADM_STATUS_OK) {
     5385 +                        zerror(zlogp, B_TRUE,
     5386 +                            "failed to delete transient link %s (%u): %s",
     5387 +                            link_name, link, dladm_status2str(status, dlerr));
5285 5388                  }
5286 5389          }
5287 5390  
     5391 +        free(dllinks);
5288 5392          return (0);
5289 5393  }
5290 5394  
5291 5395  int
5292 5396  vplat_teardown(zlog_t *zlogp, boolean_t unmount_cmd, boolean_t rebooting,
5293 5397      boolean_t debug)
5294 5398  {
5295 5399          char *kzone;
5296 5400          zoneid_t zoneid;
5297 5401          int res;
↓ open down ↓ 23 lines elided ↑ open up ↑
5321 5425          }
5322 5426  
5323 5427          if ((zoneid = getzoneidbyname(kzone)) == ZONE_ID_UNDEFINED) {
5324 5428                  if (!bringup_failure_recovery)
5325 5429                          zerror(zlogp, B_TRUE, "unable to get zoneid");
5326 5430                  if (unmount_cmd)
5327 5431                          (void) lu_root_teardown(zlogp);
5328 5432                  goto error;
5329 5433          }
5330 5434  
5331      -        if (remove_datalink_pool(zlogp, zoneid) != 0)
5332      -                zerror(zlogp, B_FALSE, "unable clear datalink pool property");
     5435 +        if (remove_datalink_pool(zlogp, zoneid) != 0) {
     5436 +                zerror(zlogp, B_FALSE,
     5437 +                    "unable to clear datalink pool property");
     5438 +        }
5333 5439  
5334      -        if (remove_datalink_protect(zlogp, zoneid) != 0)
     5440 +        if (remove_datalink_protect(zlogp, zoneid) != 0) {
5335 5441                  zerror(zlogp, B_FALSE,
5336      -                    "unable clear datalink protect property");
     5442 +                    "unable to clear datalink protect property");
     5443 +        }
5337 5444  
5338 5445          /*
5339 5446           * The datalinks assigned to the zone will be removed from the NGZ as
5340 5447           * part of zone_shutdown() so that we need to remove protect/pool etc.
5341 5448           * before zone_shutdown(). Even if the shutdown itself fails, the zone
5342 5449           * will not be able to violate any constraints applied because the
5343 5450           * datalinks are no longer available to the zone.
5344 5451           */
5345 5452          if (zone_shutdown(zoneid) != 0) {
5346 5453                  zerror(zlogp, B_TRUE, "unable to shutdown zone");
↓ open down ↓ 45 lines elided ↑ open up ↑
5392 5499                  switch (iptype) {
5393 5500                  case ZS_SHARED:
5394 5501                          if (unconfigure_shared_network_interfaces(zlogp,
5395 5502                              zoneid) != 0) {
5396 5503                                  zerror(zlogp, B_FALSE, "unable to unconfigure "
5397 5504                                      "network interfaces in zone");
5398 5505                                  goto error;
5399 5506                          }
5400 5507                          break;
5401 5508                  case ZS_EXCLUSIVE:
5402      -                        if (delete_transient_vnics(zlogp, zoneid) != 0) {
     5509 +                        if (delete_transient_links(zlogp, zoneid) != 0) {
5403 5510                                  zerror(zlogp, B_FALSE, "unable to delete "
5404      -                                    "transient vnics in zone");
     5511 +                                    "transient links in zone");
5405 5512                                  goto error;
5406 5513                          }
     5514 +                        if (unconfigure_exclusive_network_interfaces(zlogp,
     5515 +                            zoneid) != 0) {
     5516 +                                zerror(zlogp, B_FALSE, "unable to unconfigure "
     5517 +                                    "network interfaces in zone");
     5518 +                                goto error;
     5519 +                        }
5407 5520  
5408 5521                          status = dladm_zone_halt(dld_handle, zoneid);
5409 5522                          if (status != DLADM_STATUS_OK) {
5410 5523                                  zerror(zlogp, B_FALSE, "unable to notify "
5411 5524                                      "dlmgmtd of zone halt: %s",
5412 5525                                      dladm_status2str(status, errmsg));
5413 5526                                  goto error;
5414 5527                          }
5415 5528                          break;
5416 5529                  }
↓ open down ↓ 63 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX