Skip to content

Commit f867989

Browse files
committed
Merge branch 'feature/wsl-for-apps' of https://github.com/microsoft/WSL into user/beenachauhan/fix-port-conflict-error-message
2 parents 6f60b8c + 9c4dba9 commit f867989

File tree

72 files changed

+1422
-1480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1422
-1480
lines changed

cloudtest/TestGroup-wslc.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
</Setup>
2323

2424
<TestJob Name="CloudTest.Taef" TimeoutMins="120">
25-
<Execution Type="TAEF" Path="[WorkingDirectory]\wsltests.dll" Args="/p:bugReportDirectory=[LoggingDirectory]\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\test-setup.ps1 /p:Package=[WorkingDirectory]\Microsoft.WSL_${PACKAGE_VERSION}_x64_ARM64.msixbundle /p:Version=2 /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\unit_tests /p:DistroPath=[WorkingDirectory]\test_distro.tar.xz /p:TestDataPath=[WorkingDirectory]\test_data /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\stdout.txt /p:RedirectStderr=[LoggingDirectory]\stderr.txt /p:KernelLogs=[LoggingDirectory]\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe /select:&quot;@TestCategory='WSLC'&quot;" />
25+
<Execution Type="TAEF" Path="[WorkingDirectory]\wsltests.dll" Args="/p:bugReportDirectory=[LoggingDirectory]\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\test-setup.ps1 /p:Package=[WorkingDirectory]\Microsoft.WSL_${PACKAGE_VERSION}_x64_ARM64.msixbundle /p:Version=2 /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\unit_tests /p:DistroPath=[WorkingDirectory]\test_distro.tar.xz /p:TestDataPath=[WorkingDirectory]\test_data /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\stdout.txt /p:RedirectStderr=[LoggingDirectory]\stderr.txt /p:KernelLogs=[LoggingDirectory]\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe /select:&quot;@TestCategory='WSLC' and (@WSLVersion='2' or not(@WSLVersion='*'))&quot;" />
2626
</TestJob>
2727
</TestJobGroup>

cloudtest/TestGroup.xml.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222
</Setup>
2323

2424
<TestJob Name="CloudTest.Taef" TimeoutMins="240">
25-
<Execution Type="TAEF" Path="[WorkingDirectory]\wsltests.dll" Args="/p:bugReportDirectory=[LoggingDirectory]\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\test-setup.ps1 /p:Package=[WorkingDirectory]\Microsoft.WSL_${PACKAGE_VERSION}_x64_ARM64.msixbundle /p:Version=${version} /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\unit_tests /p:DistroPath=[WorkingDirectory]\test_distro.tar.xz /p:TestDataPath=[WorkingDirectory]\test_data /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\stdout.txt /p:RedirectStderr=[LoggingDirectory]\stderr.txt /p:KernelLogs=[LoggingDirectory]\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe /select:&quot;not(@TestCategory='WSLC')&quot;" />
25+
<Execution Type="TAEF" Path="[WorkingDirectory]\wsltests.dll" Args="/p:bugReportDirectory=[LoggingDirectory]\BugReportOutput /errorOnCrash /testmode:etwlogger /EtwLogger:WPRProfileFile=[WorkingDirectory]\wsl.wprp /EtwLogger:WPRProfile=WSL /EtwLogger:SavePoint=ExecutionComplete /EtwLogger:RecordingScope=Execution /p:SetupScript=.\test-setup.ps1 /p:Package=[WorkingDirectory]\Microsoft.WSL_${PACKAGE_VERSION}_x64_ARM64.msixbundle /p:Version=${version} /p:AllowUnsigned=${ALLOW_UNSIGNED_PACKAGE} /p:UnitTestsPath=[WorkingDirectory]\unit_tests /p:DistroPath=[WorkingDirectory]\test_distro.tar.xz /p:TestDataPath=[WorkingDirectory]\test_data /p:DistroName=test_distro /logOutput:High /p:RedirectStdout=[LoggingDirectory]\stdout.txt /p:RedirectStderr=[LoggingDirectory]\stderr.txt /p:KernelLogs=[LoggingDirectory]\dmesg.txt /p:DumpFolder=[LoggingDirectory] /p:WerReport /p:LogDmesg /p:PipelineBuildId=${PIPELINE_BUILD_ID} /p:DumpTool=DumpTool.exe /select:&quot;not(@TestCategory='WSLC') and (@WSLVersion='${version}' or not(@WSLVersion='*'))&quot;" />
2626
</TestJob>
2727
</TestJobGroup>

cmake/FindIDL.cmake

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function(add_idl target idl_files_with_proxy idl_files_no_proxy)
1111
endforeach()
1212

1313
string(TOLOWER ${TARGET_PLATFORM} IDL_ENV)
14+
set(PREVIOUS_OUTPUT "")
1415

1516
foreach(idl_file ${idl_files_with_proxy})
1617

@@ -27,15 +28,16 @@ function(add_idl target idl_files_with_proxy idl_files_no_proxy)
2728
set(MIDL_OUTPUT ${IDL_HEADER} ${IDL_I} ${IDL_P} ${IDL_DLLDATA})
2829

2930
add_custom_command(
30-
OUTPUT ${MIDL_OUTPUT} ${CMAKE_CURRENT_BINARY_DIR}/CmakeFiles/${target}
31+
OUTPUT ${MIDL_OUTPUT}
3132
COMMAND midl /nologo /target NT100 /env "${IDL_ENV}" /Zp8 /char unsigned /ms_ext /c_ext /h ${IDL_HEADER} /iid ${IDL_I} /proxy ${IDL_P} /dlldata ${IDL_DLLDATA} ${idl_file} ${IDL_DEFINITIONS}
32-
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/CmakeFiles/${target}"
3333
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
34-
DEPENDS ${idl_file}
34+
DEPENDS ${idl_file} ${PREVIOUS_OUTPUT}
3535
MAIN_DEPENDENCY ${idl_file}
3636
VERBATIM
3737
)
3838

39+
set(PREVIOUS_OUTPUT ${IDL_HEADER})
40+
3941
set_source_files_properties(${MIDL_OUTPUT} PROPERTIES GENERATED TRUE)
4042
list(APPEND TARGET_OUTPUTS ${MIDL_OUTPUT})
4143

@@ -48,9 +50,8 @@ function(add_idl target idl_files_with_proxy idl_files_no_proxy)
4850
set(IDL_HEADER ${OUTPUT_DIR}/${IDL_NAME}.h)
4951

5052
add_custom_command(
51-
OUTPUT ${IDL_HEADER} ${CMAKE_CURRENT_BINARY_DIR}/CmakeFiles/${target}
53+
OUTPUT ${IDL_HEADER}
5254
COMMAND midl /nologo /target NT100 /env "${IDL_ENV}" /Zp8 /char unsigned /ms_ext /c_ext /h ${IDL_HEADER} ${idl_file} ${IDL_DEFINITIONS}
53-
COMMAND ${CMAKE_COMMAND} -E touch "${CMAKE_CURRENT_BINARY_DIR}/CmakeFiles/${target}"
5455
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
5556
DEPENDS ${idl_file}
5657
MAIN_DEPENDENCY ${idl_file}

localization/strings/en-US/Resources.resw

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,6 +2317,12 @@ On first run, creates the file with all settings commented out at their defaults
23172317
<data name="WSLCCLI_SettingsResetConfirm" xml:space="preserve">
23182318
<value>Settings reset to defaults.</value>
23192319
</data>
2320+
<data name="WSLCCLI_VersionDesc" xml:space="preserve">
2321+
<value>Show version information.</value>
2322+
</data>
2323+
<data name="WSLCCLI_VersionLongDesc" xml:space="preserve">
2324+
<value>Show version information for this tool.</value>
2325+
</data>
23202326
<data name="WSLCCLI_AllArgDescription" xml:space="preserve">
23212327
<value>Show all regardless of state.</value>
23222328
</data>

msipackage/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ else()
88
set(PACKAGE_INPUT_DIR ${BIN})
99
endif()
1010

11+
# DCOM Access/Launch permission binary security descriptor.
12+
# SDDL: O:BAG:BAD:(A;;CCDCSW;;;AU)(A;;CCDCSW;;;PS)(A;;CCDCSW;;;SY)
13+
# Grants local launch/activate to Authenticated Users, Principal Self, and SYSTEM.
14+
set(DCOM_PERMISSION "01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000")
15+
1116
set(OUTPUT_PACKAGE ${BIN}/wsl.msi)
1217
set(PACKAGE_WIX_IN ${CMAKE_CURRENT_LIST_DIR}/package.wix.in)
1318
set(PACKAGE_WIX ${BIN}/package.wix)

msipackage/package.wix.in

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@
160160
<RegistryKey Root="HKCR" Key="AppID\{370121D2-AA7E-4608-A86D-0BBAB9DA1A60}">
161161

162162
<!-- O:BAG:BAD:(A;;CCDCSW;;;AU)(A;;CCDCSW;;;PS)(A;;CCDCSW;;;SY) -->
163-
<RegistryValue Name="AccessPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
164-
<RegistryValue Name="LaunchPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
163+
<RegistryValue Name="AccessPermission" Value="${DCOM_PERMISSION}" Type="binary" />
164+
<RegistryValue Name="LaunchPermission" Value="${DCOM_PERMISSION}" Type="binary" />
165165
<RegistryValue Name="LocalService" Value="WSLService" Type="string" />
166166
</RegistryKey>
167167

@@ -182,8 +182,8 @@
182182
<RegistryValue Name="AppIDFlags" Value="2048" Type="integer" />
183183

184184
<!-- O:BAG:BAD:(A;;CCDCSW;;;AU)(A;;CCDCSW;;;PS)(A;;CCDCSW;;;SY) -->
185-
<RegistryValue Name="AccessPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
186-
<RegistryValue Name="LaunchPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
185+
<RegistryValue Name="AccessPermission" Value="${DCOM_PERMISSION}" Type="binary" />
186+
<RegistryValue Name="LaunchPermission" Value="${DCOM_PERMISSION}" Type="binary" />
187187
</RegistryKey>
188188

189189
<!-- WslDeviceHost_VirtioPmem -->
@@ -244,8 +244,8 @@
244244
<!-- WSLC COM app - activated through WSLService -->
245245
<RegistryKey Root="HKCR" Key="AppID\{E9B79997-57E3-4201-AECC-6A464E530DD2}">
246246
<!-- O:BAG:BAD:(A;;CCDCSW;;;AU)(A;;CCDCSW;;;PS)(A;;CCDCSW;;;SY) -->
247-
<RegistryValue Name="AccessPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
248-
<RegistryValue Name="LaunchPermission" Value="01000480580000006800000000000000140000000200440003000000000014000B00000001010000000000050B000000000014000B00000001010000000000050A000000000014000B0000000101000000000005120000000102000000000005200000002002000001020000000000052000000020020000" Type="binary" />
247+
<RegistryValue Name="AccessPermission" Value="${DCOM_PERMISSION}" Type="binary" />
248+
<RegistryValue Name="LaunchPermission" Value="${DCOM_PERMISSION}" Type="binary" />
249249
<RegistryValue Name="LocalService" Value="WSLService" Type="string" />
250250
</RegistryKey>
251251

@@ -268,7 +268,13 @@
268268
</RegistryKey>
269269

270270
<!-- WSLCSessionFactory - COM server in per-user process -->
271+
<RegistryKey Root="HKCR" Key="AppID\{1FAB86C3-F4DF-4271-8E63-6F071C4F708A}">
272+
<!-- O:BAG:BAD:(A;;CCDCSW;;;AU)(A;;CCDCSW;;;PS)(A;;CCDCSW;;;SY) -->
273+
<RegistryValue Name="AccessPermission" Value="${DCOM_PERMISSION}" Type="binary" />
274+
<RegistryValue Name="LaunchPermission" Value="${DCOM_PERMISSION}" Type="binary" />
275+
</RegistryKey>
271276
<RegistryKey Root="HKCR" Key="CLSID\{9FCD2067-9FC6-4EFA-9EB0-698169EBF7D3}">
277+
<RegistryValue Name="AppId" Value="{1FAB86C3-F4DF-4271-8E63-6F071C4F708A}" Type="string" />
272278
<RegistryValue Value="WSLCSessionFactory" Type="string" />
273279
<RegistryKey Key="LocalServer32">
274280
<RegistryValue Value='"[INSTALLDIR]wslcsession.exe"' Type="string" />

src/windows/WslcSDK/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ set(HEADERS
1515

1616
add_library(wslcsdk SHARED ${SOURCES} ${HEADERS} wslcsdk.def)
1717
set_target_properties(wslcsdk PROPERTIES EXCLUDE_FROM_ALL FALSE)
18-
add_dependencies(wslcsdk wslcidl)
18+
add_dependencies(wslcsdk wslserviceidl)
1919
target_link_libraries(wslcsdk ${COMMON_LINK_LIBRARIES} legacy_stdio_definitions common)
2020
target_precompile_headers(wslcsdk REUSE_FROM common)
2121
set_target_properties(wslcsdk PROPERTIES FOLDER windows)

src/windows/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ set(HEADERS
133133
)
134134

135135
add_library(common STATIC ${SOURCES} ${HEADERS})
136-
add_dependencies(common wslserviceidl wslcidl localization wslservicemc wslinstalleridl)
136+
add_dependencies(common wslserviceidl localization wslservicemc wslinstalleridl)
137137

138138
target_precompile_headers(common PRIVATE precomp.h)
139139
set_target_properties(common PROPERTIES FOLDER windows)

src/windows/common/VirtioNetworking.cpp

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,29 @@ static constexpr auto c_eth0DeviceName = L"eth0";
1515
static constexpr auto c_loopbackDeviceName = TEXT(LX_INIT_LOOPBACK_DEVICE_NAME);
1616

1717
VirtioNetworking::VirtioNetworking(
18-
GnsChannel&& gnsChannel, VirtioNetworkingFlags flags, LPCWSTR dnsOptions, std::shared_ptr<GuestDeviceManager> guestDeviceManager, wil::shared_handle userToken) :
18+
GnsChannel&& gnsChannel,
19+
VirtioNetworkingFlags flags,
20+
LPCWSTR dnsOptions,
21+
std::shared_ptr<GuestDeviceManager> guestDeviceManager,
22+
wil::shared_handle userToken,
23+
wil::unique_socket&& dnsHvsocket) :
1924
m_guestDeviceManager(std::move(guestDeviceManager)),
2025
m_userToken(std::move(userToken)),
2126
m_gnsChannel(std::move(gnsChannel)),
2227
m_flags(flags),
2328
m_dnsOptions(dnsOptions)
2429
{
30+
THROW_HR_IF_MSG(
31+
E_INVALIDARG,
32+
((!!dnsHvsocket != WI_IsFlagSet(m_flags, VirtioNetworkingFlags::DnsTunnelingSocket)) ||
33+
(WI_IsFlagSet(m_flags, VirtioNetworkingFlags::DnsTunnelingSocket) && WI_IsFlagSet(m_flags, VirtioNetworkingFlags::DnsTunneling))),
34+
"Incompatible DNS settings");
35+
36+
if (dnsHvsocket)
37+
{
38+
networking::DnsResolverFlags resolverFlags{};
39+
m_dnsTunnelingResolver.emplace(std::move(dnsHvsocket), resolverFlags);
40+
}
2541
}
2642

2743
VirtioNetworking::~VirtioNetworking()
@@ -72,9 +88,11 @@ void VirtioNetworking::StartPortTracker(wil::unique_socket&& socket)
7288
}
7389

7490
void NETIOAPI_API_ VirtioNetworking::OnNetworkConnectivityChange(PVOID context, NL_NETWORK_CONNECTIVITY_HINT hint)
91+
try
7592
{
7693
static_cast<VirtioNetworking*>(context)->RefreshGuestConnection();
7794
}
95+
CATCH_LOG()
7896

7997
HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int protocol, bool allocate) const noexcept
8098
{
@@ -164,8 +182,7 @@ int VirtioNetworking::ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET&
164182
return 0;
165183
}
166184

167-
void VirtioNetworking::RefreshGuestConnection() noexcept
168-
try
185+
void VirtioNetworking::RefreshGuestConnection()
169186
{
170187
// Query current networking information before acquiring the lock.
171188
auto networkSettings = GetHostEndpointSettings();
@@ -196,6 +213,10 @@ try
196213
{
197214
currentDns = networking::HostDnsInfo::GetDnsTunnelingSettings(default_route);
198215
}
216+
else if (WI_IsFlagSet(m_flags, VirtioNetworkingFlags::DnsTunnelingSocket))
217+
{
218+
currentDns = networking::HostDnsInfo::GetDnsTunnelingSettings(TEXT(LX_INIT_DNS_TUNNELING_IP_ADDRESS));
219+
}
199220
else
200221
{
201222
wsl::core::networking::DnsSettingsFlags dnsFlags = networking::DnsSettingsFlags::IncludeVpn;
@@ -211,7 +232,6 @@ try
211232
// Add virtio net adapter to guest. If the adapter already exists update adapter state.
212233
if (device_options != m_trackedDeviceOptions)
213234
{
214-
m_trackedDeviceOptions = device_options;
215235
if (!m_adapterId.has_value())
216236
{
217237
m_adapterId = m_guestDeviceManager->AddGuestDevice(
@@ -225,6 +245,8 @@ try
225245
LOG_IF_FAILED(server->AddSharePath(c_eth0DeviceName, device_options.c_str(), 0));
226246
}
227247
}
248+
249+
m_trackedDeviceOptions = device_options;
228250
}
229251

230252
UpdateIpv4Address(networkSettings->PreferredIpAddress);
@@ -240,7 +262,6 @@ try
240262

241263
m_networkSettings = std::move(networkSettings);
242264
}
243-
CATCH_LOG();
244265

245266
void VirtioNetworking::SetupLoopbackDevice()
246267
{

src/windows/common/VirtioNetworking.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include "INetworkingEngine.h"
66
#include "GnsChannel.h"
7+
#include "DnsResolver.h"
78
#include "WslCoreHostDnsInfo.h"
89
#include "GnsPortTrackerChannel.h"
910
#include "GuestDeviceManager.h"
@@ -16,13 +17,21 @@ enum class VirtioNetworkingFlags
1617
LocalhostRelay = 0x1,
1718
DnsTunneling = 0x2,
1819
Ipv6 = 0x4,
20+
DnsTunnelingSocket = 0x8,
1921
};
2022
DEFINE_ENUM_FLAG_OPERATORS(VirtioNetworkingFlags);
2123

2224
class VirtioNetworking : public INetworkingEngine
2325
{
2426
public:
25-
VirtioNetworking(GnsChannel&& gnsChannel, VirtioNetworkingFlags flags, LPCWSTR dnsOptions, std::shared_ptr<GuestDeviceManager> guestDeviceManager, wil::shared_handle userToken);
27+
VirtioNetworking(
28+
GnsChannel&& gnsChannel,
29+
VirtioNetworkingFlags flags,
30+
LPCWSTR dnsOptions,
31+
std::shared_ptr<GuestDeviceManager> guestDeviceManager,
32+
wil::shared_handle userToken,
33+
wil::unique_socket&& dnsHvsocket = {});
34+
2635
~VirtioNetworking();
2736

2837
// Note: This class cannot be moved because m_networkNotifyHandle captures a 'this' pointer.
@@ -42,7 +51,7 @@ class VirtioNetworking : public INetworkingEngine
4251

4352
HRESULT HandlePortNotification(const SOCKADDR_INET& addr, int protocol, bool allocate) const noexcept;
4453
int ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const;
45-
void RefreshGuestConnection() noexcept;
54+
void RefreshGuestConnection();
4655
void SetupLoopbackDevice();
4756
void SendDefaultRoute(const std::wstring& gateway, wsl::shared::hns::ModifyRequestType requestType);
4857
void SendIpv6Address(const networking::EndpointIpAddress& ipAddress, wsl::shared::hns::ModifyRequestType requestType);
@@ -61,6 +70,7 @@ class VirtioNetworking : public INetworkingEngine
6170
std::shared_ptr<networking::NetworkSettings> m_networkSettings;
6271
VirtioNetworkingFlags m_flags = VirtioNetworkingFlags::None;
6372
LPCWSTR m_dnsOptions = nullptr;
73+
std::optional<networking::DnsResolver> m_dnsTunnelingResolver;
6474
std::optional<GUID> m_localhostAdapterId;
6575
std::optional<GUID> m_adapterId;
6676

0 commit comments

Comments
 (0)