Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342050
b: refs/heads/master
c: d6727fe
h: refs/heads/master
v: v3
  • Loading branch information
Joseph Gasparakis authored and David S. Miller committed Dec 9, 2012
1 parent aecdab7 commit 9964806
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc70fb640b159f1d6bf5ad2321cd55e874c8d1b8
refs/heads/master: d6727fe3850de741b9a64e4a7069b536e380e2c6
10 changes: 9 additions & 1 deletion trunk/drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,11 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
goto drop;
}

if (!skb->encapsulation) {
skb_reset_inner_headers(skb);
skb->encapsulation = 1;
}

/* Need space for new headers (invalidates iph ptr) */
if (skb_cow_head(skb, VXLAN_HEADROOM))
goto drop;
Expand Down Expand Up @@ -947,7 +952,8 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
vxlan_set_owner(dev, skb);

/* See iptunnel_xmit() */
skb->ip_summed = CHECKSUM_NONE;
if (skb->ip_summed != CHECKSUM_PARTIAL)
skb->ip_summed = CHECKSUM_NONE;
ip_select_ident(iph, &rt->dst, NULL);

err = ip_local_out(skb);
Expand Down Expand Up @@ -1168,6 +1174,8 @@ static void vxlan_setup(struct net_device *dev)
dev->tx_queue_len = 0;
dev->features |= NETIF_F_LLTX;
dev->features |= NETIF_F_NETNS_LOCAL;
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM;
dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;

spin_lock_init(&vxlan->hash_lock);
Expand Down

0 comments on commit 9964806

Please sign in to comment.