VirtualBox

Changeset 72482 in vbox


Ignore:
Timestamp:
Jun 8, 2018 1:29:34 PM (6 years ago)
Author:
vboxsync
Message:

Main/NetworkAdapter: allow arbitrary network names for disabled adapters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/NetworkAdapterImpl.cpp

    r69500 r72482  
    513513        /* if an empty/null string is to be set, bridged interface must be
    514514         * turned off */
    515         if (canonicalName.isEmpty()
     515        if (   canonicalName.isEmpty()
     516            && mData->fEnabled
    516517            && mData->mode == NetworkAttachmentType_Bridged)
    517518        {
     
    560561        /* if an empty/null string is to be set, host only interface must be
    561562         * turned off */
    562         if ( aHostOnlyInterface.isEmpty()
    563              && mData->mode == NetworkAttachmentType_HostOnly)
     563        if (   aHostOnlyInterface.isEmpty()
     564            && mData->fEnabled
     565            && mData->mode == NetworkAttachmentType_HostOnly)
    564566        {
    565567            return setError(E_FAIL,
     
    608610        /* if an empty/null string is to be set, internal networking must be
    609611         * turned off */
    610         if (aInternalNetwork.isEmpty() && mData->mode == NetworkAttachmentType_Internal)
     612        if (   aInternalNetwork.isEmpty()
     613            && mData->fEnabled
     614            && mData->mode == NetworkAttachmentType_Internal)
    611615        {
    612616            return setError(E_FAIL,
     
    654658        /* if an empty/null string is to be set, host only interface must be
    655659         * turned off */
    656         if (aNATNetwork.isEmpty()
     660        if (   aNATNetwork.isEmpty()
     661            && mData->fEnabled
    657662            && mData->mode == NetworkAttachmentType_NATNetwork)
    658663            return setError(E_FAIL,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette