Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Sebastiano Barrera <sebastiano.barrera@gmail.com>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: On Windows: Wrong source IP address
Date: Sat, 14 Sep 2019 11:11:00 -0600	[thread overview]
Message-ID: <CAHmME9p0ue59kxwD3BWGLmU3U-SmO2fxxhP7ubCsGts2GU-aZg@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9rXV2_YG3fGMErDeTjfHeNKhDC2cCYA6Kw93n9A328QpQ@mail.gmail.com>

To give more detail, a more ideal solution would be to specify the
source address / source if index using WSASendMsg, and retrieve the
incoming destination address / destination if index using WSARecvMsg,
and implement sticky socket semantics. A linux implementation in C is
here: https://git.zx2c4.com/WireGuard/tree/contrib/examples/sticky-sockets/sticky-sockets.c
and in go is here:
https://git.zx2c4.com/wireguard-go/tree/device/conn_linux.go . If you
want to provide conn_windows.go that implements sticky sockets, that
would probably solve 80% of the problem. The remaining part would be
policy routing for the case when we don't have a sender if or when
it's gone stale.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  reply	other threads:[~2019-09-14 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04 13:09 Sebastiano Barrera
2019-09-14 16:51 ` Jason A. Donenfeld
2019-09-14 17:11   ` Jason A. Donenfeld [this message]
2019-09-16  9:53     ` Sebastiano Barrera

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=CAHmME9p0ue59kxwD3BWGLmU3U-SmO2fxxhP7ubCsGts2GU-aZg@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=sebastiano.barrera@gmail.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).