Skip to content

Commit

Permalink
macvtap: Ignore tap features when VNET_HDR is off
Browse files Browse the repository at this point in the history
When the user turns off VNET_HDR support on the
macvtap device, there is no way to provide any
offload information to the user.  So, it's safer
to ignore offload setting then depend on the user
setting them correctly.

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 e558b01 commit e573332
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,11 @@ static int macvtap_forward(struct net_device *dev, struct sk_buff *skb)

skb->dev = dev;
/* Apply the forward feature mask so that we perform segmentation
* according to users wishes.
* according to users wishes. This only works if VNET_HDR is
* enabled.
*/
features |= vlan->tap_features;
if (q->flags & IFF_VNET_HDR)
features |= vlan->tap_features;
if (netif_needs_gso(skb, features)) {
struct sk_buff *segs = __skb_gso_segment(skb, features, false);

Expand Down

0 comments on commit e573332

Please sign in to comment.