VirtualBox

Changeset 75923 in vbox


Ignore:
Timestamp:
Dec 3, 2018 7:10:10 PM (6 years ago)
Author:
vboxsync
Message:

Main/DHCPServer: (bugref:9288) Fixed regression causing VMs to fail to attach to host-only adapter networks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp

    r75648 r75923  
    637637    setNetwork(strNetworkName.c_str());
    638638
     639    RTCString strTrunk;
     640    if (!server->getAttributeValue("trunkName", &strTrunk))
     641        throw ConfigFileError("DHCPServer/@trunkName missing");
     642    m_strTrunk = strTrunk.c_str();
     643
     644    RTCString strTrunkType;
     645    if (!server->getAttributeValue("trunkType", &strTrunkType))
     646        throw ConfigFileError("DHCPServer/@trunkType missing");
     647    if (strTrunkType == "none")
     648        m_enmTrunkType = kIntNetTrunkType_None;
     649    else if (strTrunkType == "whatever")
     650        m_enmTrunkType = kIntNetTrunkType_WhateverNone;
     651    else if (strTrunkType == "netflt")
     652        m_enmTrunkType = kIntNetTrunkType_NetFlt;
     653    else if (strTrunkType == "netadp")
     654        m_enmTrunkType = kIntNetTrunkType_NetAdp;
     655    else
     656        throw ConfigFileError(RTCStringFmt("Invalid DHCPServer/@trunkType value: %s", strTrunkType.c_str()));
     657
    639658    getIPv4AddrAttribute(server, "IPAddress", &m_IPv4Address);
    640659    getIPv4AddrAttribute(server, "networkMask", &m_IPv4Netmask);
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