Changeset 34335 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 24, 2010 5:49:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvIntNet.cpp
r34330 r34335 1226 1226 PDRVINTNET pThis = PDMINS_2_DATA(pDrvIns, PDRVINTNET); 1227 1227 bool f; 1228 bool fIgnoreConnectFailure; 1228 1229 PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns); 1229 1230 … … 1275 1276 "QuietlyIgnoreTrunkWirePromisc\0" 1276 1277 "IgnoreTrunkHostPromisc\0" 1278 "IgnoreConnectFailure\0" 1277 1279 "QuietlyIgnoreTrunkHostPromisc\0" 1278 1280 "IsService\0")) … … 1436 1438 /** @todo flags for not sending to the host and for setting the trunk-wire 1437 1439 * connection in promiscuous mode. */ 1440 1441 1442 /** @cfgm{IgnoreConnectFailure, boolean, false} 1443 * When set only raise a runtime error if we cannot connect to the internal 1444 * network. */ 1445 rc = CFGMR3QueryBoolDef(pCfg, "IgnoreConnectFailure", &fIgnoreConnectFailure, false); 1446 if (RT_FAILURE(rc)) 1447 return PDMDRV_SET_ERROR(pDrvIns, rc, 1448 N_("Configuration error: Failed to get the \"IgnoreConnectFailure\" value")); 1449 if (f) 1450 OpenReq.fFlags |= INTNET_OPEN_FLAGS_IGNORE_PROMISC; 1438 1451 1439 1452 … … 1539 1552 if (RT_FAILURE(rc)) 1540 1553 { 1541 PDMDrvHlpVMSetRuntimeError (pDrvIns, 0 /*fFlags*/, "HostIfNotConnecting", 1542 N_ ("Cannot connect to the network interface '%s'. The virtual " 1543 "network card will appear to work but the guest will not " 1544 "be able to connect. Please choose a different network in the " 1545 "network settings"), OpenReq.szTrunk); 1546 1547 return VERR_PDM_NO_ATTACHED_DRIVER; 1554 if (fIgnoreConnectFailure) 1555 { 1556 /* 1557 * During VM restore it is fatal if the network is not available because the 1558 * VM settings are locked and the user has no chance to fix network settings. 1559 * Therefore don't abort but just raise a runtime warning. 1560 */ 1561 PDMDrvHlpVMSetRuntimeError (pDrvIns, 0 /*fFlags*/, "HostIfNotConnecting", 1562 N_ ("Cannot connect to the network interface '%s'. The virtual " 1563 "network card will appear to work but the guest will not " 1564 "be able to connect. Please choose a different network in the " 1565 "network settings"), OpenReq.szTrunk); 1566 1567 return VERR_PDM_NO_ATTACHED_DRIVER; 1568 } 1569 else 1570 { 1571 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, 1572 N_("Failed to open/create the internal network '%s'"), pThis->szNetwork); 1573 } 1548 1574 } 1549 1575
Note:
See TracChangeset
for help on using the changeset viewer.