VirtualBox

Changeset 76007 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2018 9:51:03 AM (6 years ago)
Author:
vboxsync
Message:

Main/DHCPServer: (bugref:9288) Fixed regression causing DHCP server start failure with NAT network.

File:
1 edited

Legend:

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

    r75923 r76007  
    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 
    644639    RTCString strTrunkType;
    645640    if (!server->getAttributeValue("trunkType", &strTrunkType))
     
    656651        throw ConfigFileError(RTCStringFmt("Invalid DHCPServer/@trunkType value: %s", strTrunkType.c_str()));
    657652
     653    if (   m_enmTrunkType == kIntNetTrunkType_NetFlt
     654        || m_enmTrunkType == kIntNetTrunkType_NetAdp)
     655    {
     656        RTCString strTrunk;
     657        if (!server->getAttributeValue("trunkName", &strTrunk))
     658            throw ConfigFileError("DHCPServer/@trunkName missing");
     659        m_strTrunk = strTrunk.c_str();
     660    }
     661    else
     662        m_strTrunk = "";
     663
    658664    getIPv4AddrAttribute(server, "IPAddress", &m_IPv4Address);
    659665    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