aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/dev.c6
-rw-r--r--net/ipv4/ip_tunnel.c4
2 files changed, 3 insertions, 7 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 8ffc52e01ece..974143d3e727 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1690,13 +1690,9 @@ int dev_forward_skb(struct net_device *dev, struct sk_buff *skb)
1690 kfree_skb(skb); 1690 kfree_skb(skb);
1691 return NET_RX_DROP; 1691 return NET_RX_DROP;
1692 } 1692 }
1693 skb->protocol = eth_type_trans(skb, dev);
1694 1693
1695 /* eth_type_trans() can set pkt_type.
1696 * call skb_scrub_packet() after it to clear pkt_type _after_ calling
1697 * eth_type_trans().
1698 */
1699 skb_scrub_packet(skb, true); 1694 skb_scrub_packet(skb, true);
1695 skb->protocol = eth_type_trans(skb, dev);
1700 1696
1701 return netif_rx(skb); 1697 return netif_rx(skb);
1702} 1698}
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c
index 63a6d6d6b875..254f11c24aa5 100644
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -454,6 +454,8 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
454 tstats->rx_bytes += skb->len; 454 tstats->rx_bytes += skb->len;
455 u64_stats_update_end(&tstats->syncp); 455 u64_stats_update_end(&tstats->syncp);
456 456
457 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev)));
458
457 if (tunnel->dev->type == ARPHRD_ETHER) { 459 if (tunnel->dev->type == ARPHRD_ETHER) {
458 skb->protocol = eth_type_trans(skb, tunnel->dev); 460 skb->protocol = eth_type_trans(skb, tunnel->dev);
459 skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN); 461 skb_postpull_rcsum(skb, eth_hdr(skb), ETH_HLEN);
@@ -461,8 +463,6 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
461 skb->dev = tunnel->dev; 463 skb->dev = tunnel->dev;
462 } 464 }
463 465
464 skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(tunnel->dev)));
465
466 gro_cells_receive(&tunnel->gro_cells, skb); 466 gro_cells_receive(&tunnel->gro_cells, skb);
467 return 0; 467 return 0;
468 468