Skip to content

Commit

Permalink
macvtap: Correctly set tap features when IFF_VNET_HDR is disabled.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Aug 20, 2013
1 parent a567dd6 commit e558b01
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e558b01

Please sign in to comment.