Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Luis Ressel <aranea@aixah.de>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>,
	Roman Mamedov <rm.wg@romanrm.net>
Subject: Re: Mixed MTU hosts on a network
Date: Sat, 14 Apr 2018 19:38:15 +0500	[thread overview]
Message-ID: <20180414193815.0d0cd039@natsu> (raw)
In-Reply-To: <CAHmME9rHTu1dQi+xyyRnkKxVkC9bx91V06-qF513SsVt8e7FKg@mail.gmail.com>

On Sat, 14 Apr 2018 16:15:07 +0200
"Jason A. Donenfeld" <Jason@zx2c4.com> wrote:

> Hi Roman,
> 
> I answered this in my first email to you, which perhaps got lost in
> the mix of emails, so I'll quote the relevant part:
> 
> > 2) When we pad the packet payload. In this case, we pad it to the
> > nearest multiple of 16, but we don't let it exceed the device MTU.
> > This is skb_padding in send.c. This behavior seems like the bug in
> > your particular case, since what matters here is the route's MTU, not
> > the device MTU. For full 1412 size packets, the payload is presumably
> > being padded to 1424, since that's still less than the device MTU. In
> > order to test this theory, try setting your route MTU, as you've
> > described in your first email, to 1408 (which is a multiple of 16). If
> > this works, let me know, as it will be good motivation for fixing
> > skb_padding. If not, then it means there's a problem elsewhere to
> > investigate too.
> 
> In short, because 1408 is a multiple of 16 so it didn't get rounded
> up, whereas 1412 got rounded up to 1424.

I got that, but that still seemed to be talking about the problem with route
MTUs.

But what about if I don't touch any route MTUs at all, but set the WG device
MTU to 1412. In my further experiments that didn't work well either, causing
weird one-directional issues, and only 1408 worked.

So, is it possible to fix the padding so 1412 can be used as WG device MTU on
underlying MTU of 1492? Otherwise, shouldn't there be a warning somewhere in
the docs to not just choose the largest fitting MTU according to [1], but also
round down what you got, to a nearest multiple of 16.

[1] https://www.mail-archive.com/wireguard@lists.zx2c4.com/msg01856.html

-- 
With respect,
Roman

  reply	other threads:[~2018-04-14 14:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16  9:25 Roman Mamedov
2018-03-16  9:35 ` Matthias Ordner
2018-03-16 10:53   ` Roman Mamedov
2018-03-16 16:20     ` Roman Mamedov
2018-03-16 10:01 ` Kalin KOZHUHAROV
2018-03-26 19:12 ` Luis Ressel
2018-04-14  1:38 ` Jason A. Donenfeld
2018-04-14  2:40   ` Jason A. Donenfeld
2018-04-14 13:16     ` Jason A. Donenfeld
2018-04-14 13:40       ` Roman Mamedov
2018-04-14 14:15         ` Jason A. Donenfeld
2018-04-14 14:38           ` Roman Mamedov [this message]
2018-04-14 14:45             ` Jason A. Donenfeld
2018-04-14 15:20               ` Roman Mamedov
2018-04-14 23:08                 ` 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=20180414193815.0d0cd039@natsu \
    --to=rm@romanrm.net \
    --cc=Jason@zx2c4.com \
    --cc=aranea@aixah.de \
    --cc=rm.wg@romanrm.net \
    --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).