aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-10 04:00:29 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-07-20 03:37:39 +0200
commit3d8b8a7823e93869a42f84010c05e14743baba4f (patch)
tree6508ea5a5131858e159c8ce073c82f6f6827f6c9
parentsend: orphan skbs when buffering longterm (diff)
downloadwireguard-monolithic-historical-3d8b8a7823e93869a42f84010c05e14743baba4f.tar.xz
wireguard-monolithic-historical-3d8b8a7823e93869a42f84010c05e14743baba4f.zip
device: support 4.13's extact newlink param
-rw-r--r--src/compat/compat.h4
-rw-r--r--src/device.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index a80039d..524fe6f 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -342,6 +342,10 @@ static inline void kvfree_ours(const void *addr)
#define priv_destructor destructor
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0)
+#define newlink(a,b,c,d,e) newlink(a,b,c,d)
+#endif
+
/* https://lkml.org/lkml/2017/6/23/790 */
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/ip.h>
diff --git a/src/device.c b/src/device.c
index 2d61502..8ac433d 100644
--- a/src/device.c
+++ b/src/device.c
@@ -272,7 +272,7 @@ static void setup(struct net_device *dev)
memset(wg, 0, sizeof(struct wireguard_device));
}
-static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[])
+static int newlink(struct net *src_net, struct net_device *dev, struct nlattr *tb[], struct nlattr *data[], struct netlink_ext_ack *extack)
{
int ret = -ENOMEM, cpu;
struct wireguard_device *wg = netdev_priv(dev);