Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: lsc@lv6.tw
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: wireguard-windows incompatible with Win10 hotspot
Date: Sun, 8 Aug 2021 01:00:16 +0200	[thread overview]
Message-ID: <CAHmME9p=eROypA_auS1s-pDySdCRApbJ8Obpi_iEQ0U9V6J6Hw@mail.gmail.com> (raw)
In-Reply-To: <CALWFNqSFsa4N=1et_YcwekTyi1q6pduR9dg2SGBL-QmyiJWbSA@mail.gmail.com>

Hi lsc,

Thanks for the report. That's a curious bug indeed, especially given
that it affects both implementations.

For the wireguard-go/wintun implementation, we're using
setsockopt(IP_UNICAST_IF). For the wireguard-nt/kernel implementation,
we're using IP_PKTINFO in a cmsghdr. Judging by the description of
your report, it sounds like both of these cases are being ignored for
some reason when hotspot mode is enabled. Having a functional
IP_UNICAST_IF, and moreover a functional IP_PKTINFO, is extremely
important for things to work properly, and without it you wind up with
routing loops like the one you've described. It's actually not just
wireguard that uses those too -- I was reading the msquic source last
night and noticed that it does the same.

So, hm. I'll have to try to make a test environment for that, though
it might be slightly tricky given the hardware I have available. I'll
see what I can do.

Jason

  reply	other threads:[~2021-08-07 23:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 14:53 SC Lee
2021-08-07 23:00 ` Jason A. Donenfeld [this message]
2021-08-07 23:19   ` Jason A. Donenfeld

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='CAHmME9p=eROypA_auS1s-pDySdCRApbJ8Obpi_iEQ0U9V6J6Hw@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=lsc@lv6.tw \
    --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).