diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-25 19:45:16 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-31 17:25:23 +0100 |
commit | bedc77a7bfe0e17a80e8c162c8dd7bcc5b90f81c (patch) | |
tree | e20da661d1ac04a6981422904327753a97395dcd /src/device.h | |
parent | wg-quick: remember to rewind DNS settings on failure (diff) | |
download | wireguard-monolithic-historical-bedc77a7bfe0e17a80e8c162c8dd7bcc5b90f81c.tar.xz wireguard-monolithic-historical-bedc77a7bfe0e17a80e8c162c8dd7bcc5b90f81c.zip |
device: only take reference if netns is different
If we take two references, the namespace and the device are never freed
in the usual manner. We should thus only take a reference to another
namespace when it is a different namespace from our own.
Diffstat (limited to 'src/device.h')
-rw-r--r-- | src/device.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device.h b/src/device.h index a74f58b..6ec3cb2 100644 --- a/src/device.h +++ b/src/device.h @@ -52,6 +52,7 @@ struct wireguard_device { unsigned int num_peers, device_update_gen; u32 fwmark; u16 incoming_port; + bool have_creating_net_ref; }; int device_init(void); |