Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368602
b: refs/heads/master
c: d6a8c36
h: refs/heads/master
v: v3
  • Loading branch information
Cong Wang authored and David S. Miller committed Mar 22, 2013
1 parent b8917ef commit b95b87e
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 10c0d7ed32b7c273970a20e211c08ab46fea3c26
refs/heads/master: d6a8c36dd6f6f06f046e5c61d3fb39b777c3bdc6
7 changes: 6 additions & 1 deletion trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,8 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
struct sk_buff *segs = ERR_PTR(-EINVAL);
int mac_len = skb->mac_len;
int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb);
int outer_hlen;
int outer_hlen, id;
struct iphdr *iph;
netdev_features_t enc_features;

if (unlikely(!pskb_may_pull(skb, tnl_hlen)))
Expand All @@ -2315,6 +2316,8 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
skb_reset_mac_header(skb);
skb_set_network_header(skb, skb_inner_network_offset(skb));
skb->mac_len = skb_inner_network_offset(skb);
iph = ip_hdr(skb);
id = ntohs(iph->id);

/* segment inner packet. */
enc_features = skb->dev->hw_enc_features & netif_skb_features(skb);
Expand All @@ -2329,6 +2332,8 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb,
int udp_offset = outer_hlen - tnl_hlen;

skb->mac_len = mac_len;
iph = (struct iphdr *)skb_inner_network_header(skb);
iph->id = htons(id++);

skb_push(skb, outer_hlen);
skb_reset_mac_header(skb);
Expand Down

0 comments on commit b95b87e

Please sign in to comment.