Development discussion of WireGuard
 help / color / mirror / Atom feed
From: caskd <>
Subject: Race condition/no locking on configuration load
Date: Sun, 02 Apr 2023 12:54:12 +0000	[thread overview]
Message-ID: <> (raw)

[-- Attachment #1.1: Type: text/plain, Size: 756 bytes --]

Hello everyone,

i've hit a weird edgecase where the wireguard config gets loaded and during the load the interface gets a address assigned which just disappears. Here's how i replicate it.

ip link add $IFNAME type wireguard
wg setconf $IFNAME $CONFIG #-- while this runs, run the command below in parallel
ip -6 address add $ADDR dev $IFNAME

Following this, the added interface address doesn't persist, yet no error is returned by either iproute2 or wireguard-tools.

iproute2 6.2.0
Linux 6.1.9
wireguard-tools 1.0.20210914

Is this a known problem? I assume it has to do with no locking being done or similar but i haven't looked deeper into it.

Alex D.
RedXen System & Infrastructure Administration

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 858 bytes --]

                 reply	other threads:[~2023-04-03 22:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* 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).