projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7df9c24
)
tun: fix inability to set offloads after disabling them via ethtool
author
Yaroslav Isakov
<yaroslav.isakov@gmail.com>
Thu, 16 Mar 2017 19:44:10 +0000
(22:44 +0300)
committer
David S. Miller
<davem@davemloft.net>
Tue, 21 Mar 2017 22:30:59 +0000
(15:30 -0700)
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>
drivers/net/tun.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index 34cc3c590aa5c5c49509159d8fbf0f0cfcfca988..cc88cd7856f5e5ec4d3e3e309cbefe196c5b27ec 100644
(file)
--- 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;