summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorYaroslav Isakov <yaroslav.isakov@gmail.com>2017-03-16 20:44:10 +0100
committerDavid S. Miller <davem@davemloft.net>2017-03-21 23:30:59 +0100
commit09050957fae896e001498af1aa35c446a11cb47d (patch)
tree0a76553edb3a05acb0c835d91ade954f3b64b6fa /drivers/net/tun.c
parentnet: unix: properly re-increment inflight counter of GC discarded candidates (diff)
downloadlinux-09050957fae896e001498af1aa35c446a11cb47d.tar.xz
linux-09050957fae896e001498af1aa35c446a11cb47d.zip
tun: fix inability to set offloads after disabling them via ethtool
Added missing logic in tun driver, which prevents apps to set offloads using tun ioctl, if offloads were previously disabled via ethtool Signed-off-by: Yaroslav Isakov <yaroslav.isakov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 34cc3c590aa5..cc88cd7856f5 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1931,6 +1931,8 @@ static int set_offload(struct tun_struct *tun, unsigned long arg)
return -EINVAL;
tun->set_features = features;
+ tun->dev->wanted_features &= ~TUN_USER_FEATURES;
+ tun->dev->wanted_features |= features;
netdev_update_features(tun->dev);
return 0;