Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368601
b: refs/heads/master
c: 10c0d7e
h: refs/heads/master
i:
  368599: b1abacb
v: v3
  • Loading branch information
Cong Wang authored and David S. Miller committed Mar 22, 2013
1 parent fd4eb7a commit b8917ef
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: e287a75c6806892c0180005c462cd3be5cf93611
refs/heads/master: 10c0d7ed32b7c273970a20e211c08ab46fea3c26
7 changes: 6 additions & 1 deletion trunk/net/ipv4/gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,9 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
netdev_features_t enc_features;
int ghl = GRE_HEADER_SECTION;
struct gre_base_hdr *greh;
struct iphdr *iph;
int mac_len = skb->mac_len;
int tnl_hlen;
int tnl_hlen, id;
bool csum;

if (unlikely(skb_shinfo(skb)->gso_type &
Expand Down Expand Up @@ -170,6 +171,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *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);
segs = skb_mac_gso_segment(skb, enc_features);
Expand All @@ -179,6 +182,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
skb = segs;
tnl_hlen = skb_tnl_header_len(skb);
do {
iph = (struct iphdr *)skb->data;
iph->id = htons(id++);
__skb_push(skb, ghl);
if (csum) {
__be32 *pcsum;
Expand Down

0 comments on commit b8917ef

Please sign in to comment.