Changeset 36075 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Feb 24, 2011 4:36:48 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r36053 r36075 3479 3479 H(); 3480 3480 3481 hrc = pMachine->GetExtraData(Bstr("AllowPromiscousGuests").raw(), bstr.asOutParam()); 3482 if (SUCCEEDED(hrc) && bstr.isEmpty()) 3483 hrc = virtualBox->GetExtraData(Bstr("AllowPromiscousGuests").raw(), bstr.asOutParam()); 3484 H(); 3485 const char * const pszPromiscuousGuestPolicy = bstr.isNotEmpty() ? "allow" : "deny"; 3486 3481 3487 if (fAttachDetach && fSniffer) 3482 3488 { … … 3642 3648 ppos = pos + 1; \ 3643 3649 } while (0) 3644 ITERATE_TO_NEXT_TERM(strName, utf, pos, ppos);3645 ITERATE_TO_NEXT_TERM(strProto, utf, pos, ppos);3646 ITERATE_TO_NEXT_TERM(strHostIP, utf, pos, ppos);3647 ITERATE_TO_NEXT_TERM(strHostPort, utf, pos, ppos);3648 ITERATE_TO_NEXT_TERM(strGuestIP, utf, pos, ppos);3649 strGuestPort = utf.substr(ppos, utf.length() - ppos);3650 ITERATE_TO_NEXT_TERM(strName, utf, pos, ppos); 3651 ITERATE_TO_NEXT_TERM(strProto, utf, pos, ppos); 3652 ITERATE_TO_NEXT_TERM(strHostIP, utf, pos, ppos); 3653 ITERATE_TO_NEXT_TERM(strHostPort, utf, pos, ppos); 3654 ITERATE_TO_NEXT_TERM(strGuestIP, utf, pos, ppos); 3655 strGuestPort = utf.substr(ppos, utf.length() - ppos); 3650 3656 #undef ITERATE_TO_NEXT_TERM 3651 3657 … … 3966 3972 InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_NetFlt); 3967 3973 InsertConfigInteger(pCfg, "IgnoreConnectFailure", (uint64_t)fIgnoreConnectFailure); 3974 InsertConfigString(pCfg, "IfPolicyPromisc", pszPromiscuousGuestPolicy); 3968 3975 char szNetwork[INTNET_MAX_NETWORK_NAME]; 3969 3976 RTStrPrintf(szNetwork, sizeof(szNetwork), "HostInterfaceNetworking-%s", pszHifName); … … 4103 4110 # if defined(RT_OS_SOLARIS) 4104 4111 # if 0 /* bird: this is a bit questionable and might cause more trouble than its worth. */ 4105 /* Zone access restriction, don't allow snooping the global zone. */4106 zoneid_t ZoneId = getzoneid();4107 if (ZoneId != GLOBAL_ZONEID)4108 {4109 InsertConfigInteger(pCfg, "IgnoreAllPromisc", true);4110 }4112 /* Zone access restriction, don't allow snooping the global zone. */ 4113 zoneid_t ZoneId = getzoneid(); 4114 if (ZoneId != GLOBAL_ZONEID) 4115 { 4116 InsertConfigInteger(pCfg, "IgnoreAllPromisc", true); 4117 } 4111 4118 # endif 4112 4119 # endif … … 4137 4144 InsertConfigString(pCfg, "Network", bstr); 4138 4145 InsertConfigInteger(pCfg, "TrunkType", kIntNetTrunkType_WhateverNone); 4146 InsertConfigString(pCfg, "IfPolicyPromisc", pszPromiscuousGuestPolicy); 4139 4147 networkName = bstr; 4140 4148 trunkType = Bstr(TRUNKTYPE_WHATEVER); … … 4229 4237 H(); 4230 4238 } 4231 # define VBOX_WIN_BINDNAME_PREFIX "\\DEVICE\\"4239 # define VBOX_WIN_BINDNAME_PREFIX "\\DEVICE\\" 4232 4240 char szTrunkName[INTNET_MAX_TRUNK_NAME]; 4233 4241 char *pszTrunkName = szTrunkName; … … 4285 4293 InsertConfigString(pCfg, "Trunk", pszTrunk); 4286 4294 InsertConfigString(pCfg, "Network", szNetwork); 4287 InsertConfigInteger(pCfg, "IgnoreConnectFailure", (uint64_t)fIgnoreConnectFailure); 4295 InsertConfigInteger(pCfg, "IgnoreConnectFailure", (uint64_t)fIgnoreConnectFailure); /** @todo why is this windows only?? */ 4288 4296 networkName = Bstr(szNetwork); 4289 4297 trunkName = Bstr(pszTrunk); … … 4305 4313 trunkType = TRUNKTYPE_NETFLT; 4306 4314 #endif 4315 InsertConfigString(pCfg, "IfPolicyPromisc", pszPromiscuousGuestPolicy); 4316 4307 4317 #if !defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT) 4308 4318
Note:
See TracChangeset
for help on using the changeset viewer.