Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Maarten de Vries <maarten@de-vri.es>
To: wireguard@lists.zx2c4.com
Subject: Re: ip netns del zaps wg link
Date: Fri, 14 Jul 2023 12:27:01 +0200	[thread overview]
Message-ID: <bbbf8973-de16-781f-68dd-739e5033e681@de-vri.es> (raw)
In-Reply-To: <4fd6c9cb-c2cf-7a16-ee62-d958790652ea@gmail.com>

On 18/05/2023 01:13, Harry G Coin wrote:
> First, Hi and thanks for all the effort!
>
> At least on Ubuntu latest LTS:  As advertised, if a wireguard link 
> gets created by systemd/networkd, then set into a different net 
> namespace, all works well.
>
> However, if that namespace is deleted, the link appears to be 'gone 
> forever'.  Other link types reappear in the primary namespace when the 
> namespace they are in gets deleted.   I'm not sure whether the link 
> retains its 'up' or 'down' state when the namespace it's in gets 
> deleted and reset to primary.  Not a big deal, doesn't happen often.
>
> This is 100% repeatable.   Some other answer than 'inaccessible until 
> the next reboot' would be nice.
>
>

Hi,

This behavior is exactly what I would expect. I'm using namespaces to 
restrict access to a wireguard link. If the namespace gets destroyed, I 
absolutely do not want other programs to have access to the wireguard link.

You can simply re-create the wireguard link to use it again. This may 
not be the most convenient for you, but your use case seems to be a bit 
unconventional: you are moving and deleting a resource created by 
systemd and/or networkd manually. You are mixing automatic and manual 
management, so there is a risk of breaking the automatic management.

Alternatively, you could move the interface back before deleting the 
namespace.

Kind regards,

Maarten de Vries


  reply	other threads:[~2023-07-14 10:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-17 23:13 Harry G Coin
2023-07-14 10:27 ` Maarten de Vries [this message]
2023-07-14 21:48   ` Harry G Coin
2023-07-15  4:48     ` Michael Tokarev
2023-07-15 20:29       ` Harry G Coin

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=bbbf8973-de16-781f-68dd-739e5033e681@de-vri.es \
    --to=maarten@de-vri.es \
    --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).