All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Baptiste Jonglez <baptiste@bitsofnetworks.org>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: openwrt route_allowed_ips is inprecise
Date: Tue, 20 Dec 2016 04:14:06 +0100	[thread overview]
Message-ID: <CAHmME9rDK0MEFH2oOVjeTF0n=J6=Hsk9e5Hyj2GDnFk8V3LtwA@mail.gmail.com> (raw)
In-Reply-To: <20161220011334.GB16814@tuxmachine.polynome.dn42>

Hey Baptiste,

On Tue, Dec 20, 2016 at 2:13 AM, Baptiste Jonglez
<baptiste@bitsofnetworks.org> wrote:

> By the way, besides the issue of magic, this approach seems incorrect
> depending on the order of the routes.  Consider the case where cmd_add()
> handles the following sequence of allowed-ips:
>
>     10.0.0.0/8   dev wg0
>     10.4.7.0/24  dev wg0
>     10.4.0.0/16  dev wg1
>
> Your method would incorrectly drop the second route, and then the third
> route would take over traffic for this /24 through the wrong interface.

Very smart point and astute observation! This should be fixed here:

https://git.zx2c4.com/WireGuard/commit/?id=5838c950859f1b55ad344e81b77a0b71917ffd61

Unless there are objections, that will ship with the next snapshot.

Jason

  reply	other threads:[~2016-12-20  3:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-18 20:14 openwrt route_allowed_ips is inprecise Jason A. Donenfeld
2016-12-19  8:00 ` Jörg Thalheim
2016-12-19 12:32   ` Jason A. Donenfeld
2016-12-19 13:06     ` Baptiste Jonglez
2016-12-19 13:09       ` Jason A. Donenfeld
2016-12-19 13:19         ` Baptiste Jonglez
2016-12-19 13:21           ` Jason A. Donenfeld
2016-12-20  1:13 ` Baptiste Jonglez
2016-12-20  3:14   ` Jason A. Donenfeld [this message]
2016-12-20  3:38     ` Dan Luedtke
2016-12-20  4:33       ` Jason A. Donenfeld
2016-12-20  8:52         ` Dan Lüdtke
2016-12-20 10:15           ` Dan Lüdtke
2016-12-20 13:33             ` Jason A. Donenfeld
2016-12-20 14:51               ` Dan Lüdtke
2016-12-20 18:27                 ` 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='CAHmME9rDK0MEFH2oOVjeTF0n=J6=Hsk9e5Hyj2GDnFk8V3LtwA@mail.gmail.com' \
    --to=jason@zx2c4.com \
    --cc=baptiste@bitsofnetworks.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.