Changeset 35895 in vbox
- Timestamp:
- Feb 8, 2011 12:47:13 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/src-server/HostImpl.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostImpl.cpp
r35814 r35895 1101 1101 int r = NetIfCreateHostOnlyNetworkInterface(m->pParent, aHostNetworkInterface, aProgress); 1102 1102 if (RT_SUCCESS(r)) 1103 return S_OK; 1103 { 1104 Bstr name; 1105 1106 HRESULT hrc = (*aHostNetworkInterface)->COMGETTER(Name)(name.asOutParam()); 1107 ComAssertComRCRet(hrc, hrc); 1108 /* 1109 * We need to write the default IP address and mask to extra data now, 1110 * so the interface gets re-created after vboxnetadp.ko reload. 1111 * Note that we avoid calling EnableStaticIpConfig since it would 1112 * change the address on host's interface as well and we want to 1113 * postpone the change until VM actually starts. 1114 */ 1115 hrc = m->pParent->SetExtraData(BstrFmt("HostOnly/%ls/IPAddress", name.raw()).raw(), 1116 getDefaultIPv4Address(name).raw()); 1117 ComAssertComRCRet(hrc, hrc); 1118 hrc = m->pParent->SetExtraData(BstrFmt("HostOnly/%ls/IPNetMask", name.raw()).raw(), 1119 Bstr(VBOXNET_IPV4MASK_DEFAULT).raw()); 1120 1121 return hrc; 1122 } 1104 1123 1105 1124 return r == VERR_NOT_IMPLEMENTED ? E_NOTIMPL : E_FAIL;
Note:
See TracChangeset
for help on using the changeset viewer.

