VirtualBox

Ignore:
Timestamp:
Dec 9, 2013 1:49:46 PM (11 years ago)
Author:
vboxsync
Message:

DHCP/NAT and NAT are acting in the same manner: polling for events on main thread and waiting for packets on internal network on RECV thread. DHCP/Host-Only waits for packets on main thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/DHCP/VBoxNetDHCP.cpp

    r49838 r49842  
    9393
    9494    int                 init();
    95     int                 run(void);
    9695    void                usage(void) { /* XXX: document options */ };
    9796    int                 parseOpt(int rc, const RTGETOPTUNION& getOptVal);
     
    283282}
    284283
    285 /**
    286  * Runs the DHCP server.
    287  *
    288  * @returns exit code + error message to stderr on failure, won't return on
    289  *          success (you must kill this process).
    290  */
    291 int VBoxNetDhcp::run(void)
    292 {
    293     doReceiveLoop();
    294     return 0;
    295 }
    296 
    297284
    298285int  VBoxNetDhcp::processUDP(void *pv, size_t cbPv)
     
    306293    {
    307294        m_uCurMsgType = uMsgType;
    308         handleDhcpMsg(uMsgType, pDhcpMsg, cbPv);
     295        {
     296            /* To avoid fight with event processing thread */
     297            VBoxNetALock(this);
     298            handleDhcpMsg(uMsgType, pDhcpMsg, cbPv);
     299        }
    309300        m_uCurMsgType = UINT8_MAX;
    310301    }
     
    565556
    566557        {
     558            VBoxNetALock(this);   
    567559            ConfigurationManager *confManager = ConfigurationManager::getConfigurationManager();
    568560            confManager->flushAddressList(RTNET_DHCP_OPT_DNS);
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