Race condition/no locking on configuration load
caskd
caskd at redxen.eu
Sun Apr 2 12:54:12 UTC 2023
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.
Using:
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
https://redxen.eu/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 858 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20230402/0eb4d184/attachment.sig>
More information about the WireGuard
mailing list