[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <d66c8380b6c50fdcfe2dce344b39bb470a75ba3f.1308595725.git.mirq-linux@rere.qmqm.pl>
Date: Mon, 20 Jun 2011 21:14:55 +0200 (CEST)
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: netdev@...r.kernel.org
Cc: Herbert Xu <herbert@...dor.apana.org.au>,
"Michael S. Tsirkin" <mst@...hat.com>,
Ben Hutchings <bhutchings@...arflare.com>,
Shan Wei <shanwei@...fujitsu.com>
Subject: [RESENT PATCH] net: tuntap: Fix tun_net_fix_features()
tun->set_features are meant to limit not force the features.
Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
Acked-by: Michael S. Tsirkin <mst@...hat.com>
---
drivers/net/tun.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 4dab85e..56981c2 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -458,7 +458,7 @@ static u32 tun_net_fix_features(struct net_device *dev, u32 features)
{
struct tun_struct *tun = netdev_priv(dev);
- return (features & tun->set_features) | (features & ~TUN_USER_FEATURES);
+ return features & (tun->set_features | ~TUN_USER_FEATURES);
}
static const struct net_device_ops tun_netdev_ops = {
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists