* Windows: wintun MTU is not set
@ 2021-03-10 13:36 kay
2021-03-10 14:02 ` Jason A. Donenfeld
0 siblings, 1 reply; 3+ messages in thread
From: kay @ 2021-03-10 13:36 UTC (permalink / raw)
To: wireguard
Hi Everyone,
I noticed that the desired MTU is not set on the wintun interface.
I tried to set MTU after I create an interface:
interfaces, err := winipcfg.GetIPInterfaceTable(windows.AF_UNSPEC)
if err != nil {
return err
}
for _, iface := range interfaces {
if iface.InterfaceLUID == luid {
log.Printf("Iface: %+#v", iface)
iface.NLMTU = 1302
err = iface.Set()
if err != nil {
log.Printf("failed to set MTU: %s", err)
}
}
}
but it fails with "The parameter is incorrect." for AF_INET. Setting
MTU for AF_INET6 works with no issues.
Any idea how I can set MTU without netsh?
Regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-10 14:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 13:36 Windows: wintun MTU is not set kay
2021-03-10 14:02 ` Jason A. Donenfeld
2021-03-10 14:13 ` kay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).