Skip to content

Commit e558b01

Browse files
Vlad Yasevichdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent a567dd6 commit e558b01

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/net/macvtap.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,10 +1163,6 @@ static long macvtap_ioctl(struct file *file, unsigned int cmd,
11631163
TUN_F_TSO_ECN | TUN_F_UFO))
11641164
return -EINVAL;
11651165

1166-
/* TODO: only accept frames with the features that
1167-
got enabled for forwarded frames */
1168-
if (!(q->flags & IFF_VNET_HDR))
1169-
return -EINVAL;
11701166
rtnl_lock();
11711167
ret = set_offload(q, arg);
11721168
rtnl_unlock();

0 commit comments

Comments
 (0)