aboutsummaryrefslogtreecommitdiffstats
path: root/example/example.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-08-04 19:34:16 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-08-05 18:27:40 +0200
commit2dfeee4a254a164a2586ddd0ee8fb79ea6131040 (patch)
tree619e5fcc979d96cab9e4ca7bcacca84dc384f6e4 /example/example.c
parentdriver: socket: use implicit CMSG_SPACE for total length, for v6 (diff)
downloadwireguard-nt-2dfeee4a254a164a2586ddd0ee8fb79ea6131040.tar.xz
wireguard-nt-2dfeee4a254a164a2586ddd0ee8fb79ea6131040.zip
driver: device: implement MTU notifications properly, even if broken
Let's assume that Windows is operating as described, and then later we can hack around the limitations. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'example/example.c')
-rw-r--r--example/example.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/example.c b/example/example.c
index d006afa..828a8d0 100644
--- a/example/example.c
+++ b/example/example.c
@@ -417,11 +417,12 @@ int __cdecl main(void)
}
IpInterface.UseAutomaticMetric = FALSE;
IpInterface.Metric = 0;
+ IpInterface.NlMtu = 1420;
IpInterface.SitePrefixLength = 0;
LastError = SetIpInterfaceEntry(&IpInterface);
if (LastError != ERROR_SUCCESS)
{
- LogError(L"Failed to set metric", LastError);
+ LogError(L"Failed to set metric and MTU", LastError);
goto cleanupAdapter;
}