Skip to content

Commit 3385a0e

Browse files
author
Ben Hillis
committed
update HcsVirtualMachine with new VirtioNetworking behavior
1 parent 944a829 commit 3385a0e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/windows/wslaservice/exe/HcsVirtualMachine.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,10 @@ try
410410
THROW_IF_FAILED(wsl::core::networking::DnsResolver::LoadDnsResolverMethods());
411411
dnsSocketHandle.reset(reinterpret_cast<SOCKET>(helpers::DuplicateHandle(*DnsSocket)));
412412
}
413+
else
414+
{
415+
THROW_HR_IF(E_INVALIDARG, DnsSocket != nullptr);
416+
}
413417

414418
if (m_networkingMode == WSLANetworkingModeNAT)
415419
{
@@ -439,8 +443,9 @@ try
439443
}
440444
else if (m_networkingMode == WSLANetworkingModeVirtioProxy)
441445
{
446+
wsl::core::VirtioNetworkingFlags flags = wsl::core::VirtioNetworkingFlags::None;
442447
m_networkEngine = std::make_unique<wsl::core::VirtioNetworking>(
443-
wsl::core::GnsChannel(std::move(gnsSocketHandle)), false, nullptr, m_guestDeviceManager, m_userToken);
448+
wsl::core::GnsChannel(std::move(gnsSocketHandle)), flags, nullptr, m_guestDeviceManager, m_userToken);
444449
}
445450
else
446451
{

0 commit comments

Comments
 (0)