aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/device.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-10 14:09:12 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-07-20 03:37:39 +0200
commit9881a2569f554006d16590e03a31193bfedd23a3 (patch)
tree73c9f842b6b531c5722931cdd9b28426c575316f /src/device.c
parentdevice: support 4.13's extact newlink param (diff)
downloadwireguard-monolithic-historical-9881a2569f554006d16590e03a31193bfedd23a3.tar.xz
wireguard-monolithic-historical-9881a2569f554006d16590e03a31193bfedd23a3.zip
global: use pointer to net_device
DaveM prefers it to be this way per [1]. [1] http://www.spinics.net/lists/netdev/msg443992.html
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index 8ac433d..cb5517e 100644
--- a/src/device.c
+++ b/src/device.c
@@ -270,6 +270,7 @@ static void setup(struct net_device *dev)
netif_keep_dst(dev);
memset(wg, 0, sizeof(struct wireguard_device));
+ wg->dev = dev;
}
static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[], struct netlink_ext_ack *extack)