aboutsummaryrefslogtreecommitdiffstats
path: root/example/example.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-08-03 17:35:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-08-03 17:37:08 +0200
commit60adb7d0bf7ad969e5aabc46f4bbcebed33791af (patch)
treeffbb596ae9d0c09dde3a4e80b260356b2d357c4f /example/example.c
parentdriver: socket: ignore interfaces with down oper status (diff)
downloadwireguard-nt-60adb7d0bf7ad969e5aabc46f4bbcebed33791af.tar.xz
wireguard-nt-60adb7d0bf7ad969e5aabc46f4bbcebed33791af.zip
example: remove MTU setting due to complications
In line with ff41718 ("TODO: note current unsolved MTU notification issue") of this repo and 3f07aa3f ("winipcfg: set MTU in registry after setting it in iphlpapi") of the wireguard-windows repo, it seems like MTU changes are still complicated and partially unsolved, so just leave it out of the example code for now. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'example/example.c')
-rw-r--r--example/example.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/example/example.c b/example/example.c
index 828a8d0..d006afa 100644
--- a/example/example.c
+++ b/example/example.c
@@ -417,12 +417,11 @@ 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 and MTU", LastError);
+ LogError(L"Failed to set metric", LastError);
goto cleanupAdapter;
}