Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Xiumei Mu <xmu@redhat.com>, Paolo Abeni <pabeni@redhat.com>,
	wireguard@lists.zx2c4.com
Subject: Re: [PATCH net] wireguard: remove peer cache in netns_pre_exit
Date: Thu, 02 Sep 2021 18:26:23 +0200	[thread overview]
Message-ID: <877dfzt040.fsf@toke.dk> (raw)
In-Reply-To: <YS+GX/Y85bch4gMU@zx2c4.com>

"Jason A. Donenfeld" <Jason@zx2c4.com> writes:

> Hi Hangbin,
>
> Thanks for the patch and especially for the test. While I see that
> you've pointed to a real problem, I don't think that this particular way
> of fixing it is correct, because it will cause issues for userspace that
> expects to be able to read back the list of peers for, for example,
> keeping track of the latest endpoint addresses or rx/tx transfer
> quantities.
>
> I think the real solution here is to simply clear the endpoint src cache
> and consequently the dst_cache. This is slightly complicated by the fact
> that dst_cache releases dsts lazily, so I needed to add a little utility
> function for that, but that was pretty easy to do.
>
> Can you take a look at the below patch and let me know if it works for
> you and passes other testing you and Toke might be doing with it? (Also,
> please CC the wireguard mailing list in addition to netdev next time?)
> If the patch looks good to you and works well, I'll include it in the
> next series of wireguard patches I send back out to netdev. I'm back
> from travels next week and will begin working on the next series then.

Ran this through the same series of tests as the previous patch, and
indeed it also seems to resolve the issue, so feel free to add:

Tested-by: Toke Høiland-Jørgensen <toke@redhat.com>

-Toke


  reply	other threads:[~2021-09-02 16:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210901122904.9094-1-liuhangbin@gmail.com>
2021-09-01 13:55 ` Jason A. Donenfeld
2021-09-02 16:26   ` Toke Høiland-Jørgensen [this message]
2021-09-03 12:16     ` Hangbin Liu
2021-09-03 13:10       ` Toke Høiland-Jørgensen
2021-09-04  8:43   ` Hangbin Liu
2021-10-25  4:06   ` Hangbin Liu
2021-10-25  4:28     ` 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=877dfzt040.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=liuhangbin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=wireguard@lists.zx2c4.com \
    --cc=xmu@redhat.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).