Hi, I ran into a problem when implementing "dladm (re)set-linkprop -t -p zone=<zone> <link>" in the vanity naming workspace.
As you might know, when <link> is a VLAN ppa hack name, the VLAN will be created as a result of either a "set-linkprop -t -p zone=<local-zone>" operation, or a local zone boot if this VLAN is set to that zone. Similarly, this VLAN will be destroyed if one set it back to the global zone by "reset-linkprop -t -p zone", or when the zone is shutdown. Here is the problem: usually, I would think that one can only run "set-linkprop" on an existent link, so that I can use linkid as the argument of dladm_set_linkprop(), but in the case of zone linkprop, a link can be destroyed (or created) as part of dladm_set_linkprop(), that violates the assumption. Given an example: a. assign a VLAN bge1000 to zone foo. b. boot zone foo. (this creates bge1000) c. change autopush configuration of bge1000. d. set-linkprop -t -p zone bge1000 to the global zone. This destroys the link bge1000. As the result, the per-link autopush setting of bge1000 is gone. I don't know how to solve this problem. Please let me know your suggestion. BTW, today, "reset-linkprop -p zone" will reset a link's zoneid to the global zone, but I would think it makes more sense to reset its zoneid to whichever zone it is assigned to. (Of course, if no such zone exists, then its zoneid should be set to the global zone). Thanks - Cathy
