Development discussion of WireGuard
 help / color / mirror / Atom feed
From: kay <kay.diam@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: Windows: wintun MTU is not set
Date: Wed, 10 Mar 2021 15:13:40 +0100	[thread overview]
Message-ID: <CANaOheZoKG4m=hMUCbWcsU4PHbKPS5ZtYtqmYvddBPM3-NNv_A@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9o96vy1bo=V+p0C0a5LXuG_6Cw2onoJfTL=5MDg6g=h3A@mail.gmail.com>

Thanks. The following code worked for me:

        luid := winipcfg.LUID(tun.LUID())
        iface, err := luid.IPInterface(windows.AF_INET)
        if err != nil {
                return err
        }
        iface.NLMTU = 1302
        err = iface.Set()
        if err != nil {
                return fmt.Errorf("failed to set MTU: %s", err)
        }

On Wed, Mar 10, 2021 at 3:03 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Try using the object returned by luid.IPInterface(windows.AF_INET). Or
> in your example, use AF_INET instead of AF_UNSPEC.

      reply	other threads:[~2021-03-10 14:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 13:36 kay
2021-03-10 14:02 ` Jason A. Donenfeld
2021-03-10 14:13   ` kay [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANaOheZoKG4m=hMUCbWcsU4PHbKPS5ZtYtqmYvddBPM3-NNv_A@mail.gmail.com' \
    --to=kay.diam@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).