Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368172
b: refs/heads/master
c: 4f3ed92
h: refs/heads/master
v: v3
  • Loading branch information
Pravin B Shelar authored and David S. Miller committed Mar 9, 2013
1 parent 4f2a22f commit 0aac7c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 8344bfc6008d1c7b8b541bb25de7dfacb2188b95
refs/heads/master: 4f3ed9209f7f75ff0ee21bc5052d76542dd75b5f
13 changes: 7 additions & 6 deletions trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,6 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)

if (skb->protocol != htons(ETH_P_IP))
goto tx_error;

if (skb->ip_summed == CHECKSUM_PARTIAL &&
skb_checksum_help(skb))
goto tx_error;

old_iph = ip_hdr(skb);

if (tos & 1)
Expand Down Expand Up @@ -572,6 +567,13 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
old_iph = ip_hdr(skb);
}

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

skb->transport_header = skb->network_header;
skb_push(skb, sizeof(struct iphdr));
skb_reset_network_header(skb);
Expand Down Expand Up @@ -599,7 +601,6 @@ static netdev_tx_t ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
iph->ttl = old_iph->ttl;

nf_reset(skb);
skb->ip_summed = CHECKSUM_NONE;

pkt_len = skb->len - skb_transport_offset(skb);
err = ip_local_out(skb);
Expand Down

0 comments on commit 0aac7c2

Please sign in to comment.