提交 09050957 编写于 作者: Y Yaroslav Isakov 提交者: David S. Miller

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: NYaroslav Isakov <yaroslav.isakov@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7df9c246
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册