diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2013-05-02 12:17:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-03 16:08:59 -0400 |
commit | 0d05535d413322341f89c77f32936b4df296ac5a (patch) | |
tree | 2ed950238053f607f28ba819467ebae5aacaa408 /net | |
parent | 9b3eb5edf33897dc9128aa27300066153d4f8b9c (diff) |
vxlan: Fix TCPv6 segmentation.
This patch set correct skb->protocol so that inner packet can
lookup correct gso handler.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/udp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 6abbe6455129..0ae038a4c7a8 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -2311,8 +2311,10 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | |||
2311 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 2311 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
2312 | int mac_len = skb->mac_len; | 2312 | int mac_len = skb->mac_len; |
2313 | int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb); | 2313 | int tnl_hlen = skb_inner_mac_header(skb) - skb_transport_header(skb); |
2314 | int outer_hlen; | 2314 | struct ethhdr *inner_eth = (struct ethhdr *)skb_inner_mac_header(skb); |
2315 | __be16 protocol = skb->protocol; | ||
2315 | netdev_features_t enc_features; | 2316 | netdev_features_t enc_features; |
2317 | int outer_hlen; | ||
2316 | 2318 | ||
2317 | if (unlikely(!pskb_may_pull(skb, tnl_hlen))) | 2319 | if (unlikely(!pskb_may_pull(skb, tnl_hlen))) |
2318 | goto out; | 2320 | goto out; |
@@ -2322,6 +2324,8 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | |||
2322 | skb_reset_mac_header(skb); | 2324 | skb_reset_mac_header(skb); |
2323 | skb_set_network_header(skb, skb_inner_network_offset(skb)); | 2325 | skb_set_network_header(skb, skb_inner_network_offset(skb)); |
2324 | skb->mac_len = skb_inner_network_offset(skb); | 2326 | skb->mac_len = skb_inner_network_offset(skb); |
2327 | inner_eth = (struct ethhdr *)skb_mac_header(skb); | ||
2328 | skb->protocol = inner_eth->h_proto; | ||
2325 | 2329 | ||
2326 | /* segment inner packet. */ | 2330 | /* segment inner packet. */ |
2327 | enc_features = skb->dev->hw_enc_features & netif_skb_features(skb); | 2331 | enc_features = skb->dev->hw_enc_features & netif_skb_features(skb); |
@@ -2358,6 +2362,7 @@ static struct sk_buff *skb_udp_tunnel_segment(struct sk_buff *skb, | |||
2358 | 2362 | ||
2359 | } | 2363 | } |
2360 | skb->ip_summed = CHECKSUM_NONE; | 2364 | skb->ip_summed = CHECKSUM_NONE; |
2365 | skb->protocol = protocol; | ||
2361 | } while ((skb = skb->next)); | 2366 | } while ((skb = skb->next)); |
2362 | out: | 2367 | out: |
2363 | return segs; | 2368 | return segs; |