parallels: set correct network adapter link state

when a new network adapter device is added

Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
This commit is contained in:
Maxim Nestratov 2015-03-18 11:33:54 +03:00 committed by Michal Privoznik
parent 50e0a1bff8
commit 46f4a532d5

View File

@ -2660,7 +2660,9 @@ static int prlsdkAddNet(PRL_HANDLE sdkdom,
pret = PrlVmDev_SetEnabled(sdknet, 1); pret = PrlVmDev_SetEnabled(sdknet, 1);
prlsdkCheckRetGoto(pret, cleanup); prlsdkCheckRetGoto(pret, cleanup);
pret = PrlVmDev_SetConnected(sdknet, net->linkstate); pret = PrlVmDev_SetConnected(sdknet, net->linkstate !=
VIR_DOMAIN_NET_INTERFACE_LINK_STATE_DOWN);
prlsdkCheckRetGoto(pret, cleanup); prlsdkCheckRetGoto(pret, cleanup);
if (net->ifname) { if (net->ifname) {