Changeset 8341 in vbox for trunk/src/VBox
- Timestamp:
- Apr 23, 2008 7:55:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvNAT.cpp
r8340 r8341 362 362 } 363 363 364 /** 365 * Get the MAC address into the slirp stack. 366 */ 367 static void drvNATSetMac(PDRVNAT pData) 368 { 369 PDMMAC Mac; 370 if (pData->pConfig) 371 pData->pConfig->pfnGetMac(pData->pConfig, &Mac); 372 slirp_set_ethaddr(pData->pNATState, Mac.au8); 373 } 374 364 375 365 376 /** … … 371 382 { 372 383 PDRVNAT pData = PDMINS2DATA(pDrvIns, PDRVNAT); 373 PDMMAC Mac; 374 if (pData->pConfig) 375 pData->pConfig->pfnGetMac(pData->pConfig, &Mac); 376 slirp_set_ethaddr(pData->pNATState, Mac.au8); 384 drvNATSetMac(pData); 377 385 return VINF_SUCCESS; 386 } 387 388 389 /** 390 * Some guests might not use DHCP to retrieve an IP but use a static IP. 391 */ 392 static DECLCALLBACK(void) drvNATPowerOn(PPDMDRVINS pDrvIns) 393 { 394 PDRVNAT pData = PDMINS2DATA(pDrvIns, PDRVNAT); 395 drvNATSetMac(pData); 378 396 } 379 397 … … 557 575 NULL, 558 576 /* pfnPowerOn */ 559 NULL,577 drvNATPowerOn, 560 578 /* pfnReset */ 561 579 NULL,
Note:
See TracChangeset
for help on using the changeset viewer.