aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/gre.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/ipv4/gre.c b/net/ipv4/gre.c
index e20631cb4185..7a4c710c4cdd 100644
--- a/net/ipv4/gre.c
+++ b/net/ipv4/gre.c
@@ -125,9 +125,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
125 netdev_features_t enc_features; 125 netdev_features_t enc_features;
126 int ghl = GRE_HEADER_SECTION; 126 int ghl = GRE_HEADER_SECTION;
127 struct gre_base_hdr *greh; 127 struct gre_base_hdr *greh;
128 struct iphdr *iph;
129 int mac_len = skb->mac_len; 128 int mac_len = skb->mac_len;
130 int tnl_hlen, id; 129 int tnl_hlen;
131 bool csum; 130 bool csum;
132 131
133 if (unlikely(skb_shinfo(skb)->gso_type & 132 if (unlikely(skb_shinfo(skb)->gso_type &
@@ -171,8 +170,6 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
171 skb_set_network_header(skb, skb_inner_network_offset(skb)); 170 skb_set_network_header(skb, skb_inner_network_offset(skb));
172 skb->mac_len = skb_inner_network_offset(skb); 171 skb->mac_len = skb_inner_network_offset(skb);
173 172
174 iph = ip_hdr(skb);
175 id = ntohs(iph->id);
176 /* segment inner packet. */ 173 /* segment inner packet. */
177 enc_features = skb->dev->hw_enc_features & netif_skb_features(skb); 174 enc_features = skb->dev->hw_enc_features & netif_skb_features(skb);
178 segs = skb_mac_gso_segment(skb, enc_features); 175 segs = skb_mac_gso_segment(skb, enc_features);
@@ -182,8 +179,6 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
182 skb = segs; 179 skb = segs;
183 tnl_hlen = skb_tnl_header_len(skb); 180 tnl_hlen = skb_tnl_header_len(skb);
184 do { 181 do {
185 iph = (struct iphdr *)skb->data;
186 iph->id = htons(id++);
187 __skb_push(skb, ghl); 182 __skb_push(skb, ghl);
188 if (csum) { 183 if (csum) {
189 __be32 *pcsum; 184 __be32 *pcsum;