- Timestamp:
- Jun 21, 2010 9:07:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r30016 r30349 153 153 /** The guest IP for port-forwarding. */ 154 154 uint32_t GuestIP; 155 uint32_t alignment1; 155 /** Link state set when the VM is suspended. */ 156 PDMNETWORKLINKSTATE enmLinkStateWant; 156 157 157 158 #ifdef VBOX_WITH_SLIRP_MT … … 594 595 static void drvNATNotifyLinkChangedWorker(PDRVNAT pThis, PDMNETWORKLINKSTATE enmLinkState) 595 596 { 596 pThis->enmLinkState = enmLinkState; 597 597 pThis->enmLinkState = pThis->enmLinkStateWant = enmLinkState; 598 598 switch (enmLinkState) 599 599 { … … 627 627 LogFlow(("drvNATNetworkUp_NotifyLinkChanged: enmLinkState=%d\n", enmLinkState)); 628 628 629 /* don't queue new requests when the NAT thread is about to stop */ 629 /* Don't queue new requests when the NAT thread is about to stop. 630 * But the VM could also be paused. So memorize the desired state. */ 630 631 if (pThis->pSlirpThread->enmState != PDMTHREADSTATE_RUNNING) 632 { 633 pThis->enmLinkStateWant = enmLinkState; 631 634 return; 635 } 632 636 633 637 PRTREQ pReq; … … 670 674 if (pThread->enmState == PDMTHREADSTATE_INITIALIZING) 671 675 return VINF_SUCCESS; 676 677 if (pThis->enmLinkStateWant != pThis->enmLinkState) 678 drvNATNotifyLinkChangedWorker(pThis, pThis->enmLinkStateWant); 672 679 673 680 /* … … 1282 1289 #endif 1283 1290 1284 pThis->enmLinkState = PDMNETWORKLINKSTATE_UP;1291 pThis->enmLinkState = pThis->enmLinkStateWant = PDMNETWORKLINKSTATE_UP; 1285 1292 1286 1293 /* might return VINF_NAT_DNS */
Note:
See TracChangeset
for help on using the changeset viewer.