VirtualBox

Changeset 66866 in vbox for trunk


Ignore:
Timestamp:
May 10, 2017 2:26:39 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:8847: Host Network Manager: Make sure DHCP server parameters proposal is also taken into account when activating DHCP server blindly using the checkbox in the interface table.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp

    r66783 r66866  
    3232# include "UIHostNetworkDetailsDialog.h"
    3333# include "UIHostNetworkManager.h"
     34# include "UIHostNetworkUtils.h"
    3435# include "UIMessageCenter.h"
    3536# include "UIToolBar.h"
     
    653654                if (comServer.isOk())
    654655                    comServer.SetEnabled(!oldData.m_dhcpserver.m_fEnabled);
     656                /* Save default DHCP server configuration if current is invalid: */
     657                if (   comServer.isOk()
     658                    && !oldData.m_dhcpserver.m_fEnabled
     659                    && (   oldData.m_dhcpserver.m_strAddress == "0.0.0.0"
     660                        || oldData.m_dhcpserver.m_strMask == "0.0.0.0"
     661                        || oldData.m_dhcpserver.m_strLowerAddress == "0.0.0.0"
     662                        || oldData.m_dhcpserver.m_strUpperAddress == "0.0.0.0"))
     663                {
     664                    const QStringList &proposal = makeDhcpServerProposal(oldData.m_interface.m_strAddress,
     665                                                                         oldData.m_interface.m_strMask);
     666                    comServer.SetConfiguration(proposal.at(0), proposal.at(1), proposal.at(2), proposal.at(3));
     667                }
    655668
    656669                /* Show error message if necessary: */
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