aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvtap.c
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-08-16 15:25:01 -0400
committerDavid S. Miller <davem@davemloft.net>2013-08-20 13:09:11 -0700
commite558b0188bb7e35ffc4d35253c6b9ea491f3b996 (patch)
tree58650cee572fa50f58d39afffd32abeb13ef6349 /drivers/net/macvtap.c
parentmacvtap: simplify usage of tap_features (diff)
downloadlinux-dev-e558b0188bb7e35ffc4d35253c6b9ea491f3b996.tar.xz
linux-dev-e558b0188bb7e35ffc4d35253c6b9ea491f3b996.zip
macvtap: Correctly set tap features when IFF_VNET_HDR is disabled.
When the user turns off IFF_VNET_HDR flag, attempts to change offload features via TUNSETOFFLOAD do not work. This could cause GSO packets to be delivered to the user when the user is not prepared to handle them. To solve, allow processing of TUNSETOFFLOAD when IFF_VNET_HDR is disabled. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/macvtap.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 448f8a505cd9..4acfbce63a7d 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -1163,10 +1163,6 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
TUN_F_TSO_ECN | TUN_F_UFO))
return -EINVAL;
- /* TODO: only accept frames with the features that
- got enabled for forwarded frames */
- if (!(q->flags & IFF_VNET_HDR))
- return -EINVAL;
rtnl_lock();
ret = set_offload(q, arg);
rtnl_unlock();