[Devel] [PATCH RHEL7 COMMIT] ve/net/tun: don't loose NETIF_F_VIRTUAL device feature
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Jun 16 05:07:03 PDT 2015
The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.13
------>
commit 57420894574e45a7c1f0ed6e430566b2288e01ef
Author: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Date: Tue Jun 16 16:07:02 2015 +0400
ve/net/tun: don't loose NETIF_F_VIRTUAL device feature
move setting NETIF_F_VIRTUAL from tun_setup to tun_set_iff
where other features are set, as tun_setup is only called in
tun_set_iff
https://jira.sw.ru/browse/PSBM-34066
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Acked-by: Kirill Tkhai <ktkhai at odin.com>
---
drivers/net/tun.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 9c57c11..614dabb 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1437,7 +1437,6 @@ static void tun_setup(struct net_device *dev)
dev->ethtool_ops = &tun_ethtool_ops;
dev->destructor = tun_free_netdev;
- dev->features |= NETIF_F_VIRTUAL;
}
/* Trivial set of netlink ops to allow deleting tun or tap
@@ -1701,7 +1700,7 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
TUN_USER_FEATURES;
- dev->features = dev->hw_features;
+ dev->features = dev->hw_features | NETIF_F_VIRTUAL;
dev->vlan_features = dev->features;
INIT_LIST_HEAD(&tun->disabled);
More information about the Devel
mailing list