diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-02-27 11:55:02 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-02-27 11:55:02 -0800 |
commit | 9ba26b1e18bb6d69cfe01df222948a1c6b028f32 (patch) | |
tree | cc3e428e1712b0269d5c481e7582b3aff217dc66 /src | |
parent | version: bump snapshot (diff) | |
download | wireguard-monolithic-historical-9ba26b1e18bb6d69cfe01df222948a1c6b028f32.tar.xz wireguard-monolithic-historical-9ba26b1e18bb6d69cfe01df222948a1c6b028f32.zip |
device: 4.11 uses cnf for addr_gen_mode
Diffstat (limited to 'src')
-rw-r--r-- | src/device.c | 4 |
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) |