---
src/parallels/parallels_sdk.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
index fd20e1b..f244d75 100644
--- a/src/parallels/parallels_sdk.c
+++ b/src/parallels/parallels_sdk.c
@@ -2088,7 +2088,8 @@ static int prlsdkCheckSerialUnsupportedParams(virDomainChrDefPtr
chr)
static int prlsdkCheckNetUnsupportedParams(virDomainNetDefPtr net)
{
- if (net->type != VIR_DOMAIN_NET_TYPE_NETWORK) {
+ if (net->type != VIR_DOMAIN_NET_TYPE_NETWORK &&
+ net->type != VIR_DOMAIN_NET_TYPE_BRIDGE) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Specified network adapter type is not "
"supported by Parallels Cloud Server."));
@@ -2137,13 +2138,13 @@ static int prlsdkCheckNetUnsupportedParams(virDomainNetDefPtr
net)
return -1;
}
- if (net->filter) {
+/* if (net->filter) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Setting network filter is not "
"supported by parallels driver."));
return -1;
}
-
+*/
if (net->bandwidth) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("Setting network bandwidth is not "
@@ -2442,11 +2443,16 @@ static int prlsdkAddNet(PRL_HANDLE sdkdom, virDomainNetDefPtr
net)
pret = PrlVmDevNet_SetMacAddress(sdknet, macstr);
prlsdkCheckRetGoto(pret, cleanup);
- if (STREQ(net->data.network.name, PARALLELS_ROUTED_NETWORK_NAME)) {
- pret = PrlVmDev_SetEmulatedType(sdknet, PNA_ROUTED);
- prlsdkCheckRetGoto(pret, cleanup);
- } else {
- pret = PrlVmDevNet_SetVirtualNetworkId(sdknet, net->data.network.name);
+ if (net->type == VIR_DOMAIN_NET_TYPE_NETWORK) {
+ if (STREQ(net->data.network.name, PARALLELS_ROUTED_NETWORK_NAME)) {
+ pret = PrlVmDev_SetEmulatedType(sdknet, PNA_ROUTED);
+ prlsdkCheckRetGoto(pret, cleanup);
+ } else {
+ pret = PrlVmDevNet_SetVirtualNetworkId(sdknet, net->data.network.name);
+ prlsdkCheckRetGoto(pret, cleanup);
+ }
+ } else if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
+ pret = PrlVmDevNet_SetVirtualNetworkId(sdknet, "__undefined__");
prlsdkCheckRetGoto(pret, cleanup);
}
--
2.1.0