Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09050957 authored by Yaroslav Isakov's avatar Yaroslav Isakov Committed by David S. Miller
Browse files

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: default avatarYaroslav Isakov <yaroslav.isakov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7df9c246
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;