summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-02-27 11:55:02 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2017-02-27 11:55:02 -0800
commit6f3d335376a26b703e6aca96c1d219df2e78b8bd (patch)
tree68b6cb252ab963624a117e1f7cba36f121658197
parent39cdfc7d31c75f1ccc002ca503a075de3f0f8c23 (diff)
device: 4.11 uses cnf for addr_gen_mode
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--src/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/device.c b/src/device.c
index df5d6ec..11bc5aa 100644
--- a/src/device.c
+++ b/src/device.c
@@ -41,7 +41,11 @@ static int open(struct net_device *dev)
int ret;
struct inet6_dev *dev_v6 = __in6_dev_get(dev);
if (dev_v6)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
dev_v6->addr_gen_mode = IN6_ADDR_GEN_MODE_NONE;
+#else
+ dev_v6->cnf.addr_gen_mode = IN6_ADDR_GEN_MODE_NONE;
+#endif
ret = socket_init(wg);
if (ret < 0)