diff options
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index f18f842ac893..19abcc9d6a1a 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -581,12 +581,10 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
581 | tunnel->parms.iph.protocol != 0) | 581 | tunnel->parms.iph.protocol != 0) |
582 | goto out; | 582 | goto out; |
583 | 583 | ||
584 | secpath_reset(skb); | ||
585 | skb->mac_header = skb->network_header; | 584 | skb->mac_header = skb->network_header; |
586 | skb_reset_network_header(skb); | 585 | skb_reset_network_header(skb); |
587 | IPCB(skb)->flags = 0; | 586 | IPCB(skb)->flags = 0; |
588 | skb->protocol = htons(ETH_P_IPV6); | 587 | skb->protocol = htons(ETH_P_IPV6); |
589 | skb->pkt_type = PACKET_HOST; | ||
590 | 588 | ||
591 | if (tunnel->dev->priv_flags & IFF_ISATAP) { | 589 | if (tunnel->dev->priv_flags & IFF_ISATAP) { |
592 | if (!isatap_chksrc(skb, iph, tunnel)) { | 590 | if (!isatap_chksrc(skb, iph, tunnel)) { |
@@ -603,7 +601,7 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
603 | } | 601 | } |
604 | } | 602 | } |
605 | 603 | ||
606 | __skb_tunnel_rx(skb, tunnel->dev); | 604 | __skb_tunnel_rx(skb, tunnel->dev, tunnel->net); |
607 | 605 | ||
608 | err = IP_ECN_decapsulate(iph, skb); | 606 | err = IP_ECN_decapsulate(iph, skb); |
609 | if (unlikely(err)) { | 607 | if (unlikely(err)) { |
@@ -621,8 +619,6 @@ static int ipip6_rcv(struct sk_buff *skb) | |||
621 | tstats->rx_packets++; | 619 | tstats->rx_packets++; |
622 | tstats->rx_bytes += skb->len; | 620 | tstats->rx_bytes += skb->len; |
623 | 621 | ||
624 | if (!net_eq(tunnel->net, dev_net(tunnel->dev))) | ||
625 | skb_scrub_packet(skb); | ||
626 | netif_rx(skb); | 622 | netif_rx(skb); |
627 | 623 | ||
628 | return 0; | 624 | return 0; |
@@ -860,9 +856,6 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
860 | tunnel->err_count = 0; | 856 | tunnel->err_count = 0; |
861 | } | 857 | } |
862 | 858 | ||
863 | if (!net_eq(tunnel->net, dev_net(dev))) | ||
864 | skb_scrub_packet(skb); | ||
865 | |||
866 | /* | 859 | /* |
867 | * Okay, now see if we can stuff it in the buffer as-is. | 860 | * Okay, now see if we can stuff it in the buffer as-is. |
868 | */ | 861 | */ |
@@ -888,8 +881,8 @@ static netdev_tx_t ipip6_tunnel_xmit(struct sk_buff *skb, | |||
888 | ttl = iph6->hop_limit; | 881 | ttl = iph6->hop_limit; |
889 | tos = INET_ECN_encapsulate(tos, ipv6_get_dsfield(iph6)); | 882 | tos = INET_ECN_encapsulate(tos, ipv6_get_dsfield(iph6)); |
890 | 883 | ||
891 | err = iptunnel_xmit(dev_net(dev), rt, skb, fl4.saddr, fl4.daddr, | 884 | err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, IPPROTO_IPV6, tos, |
892 | IPPROTO_IPV6, tos, ttl, df); | 885 | ttl, df, !net_eq(tunnel->net, dev_net(dev))); |
893 | iptunnel_xmit_stats(err, &dev->stats, dev->tstats); | 886 | iptunnel_xmit_stats(err, &dev->stats, dev->tstats); |
894 | return NETDEV_TX_OK; | 887 | return NETDEV_TX_OK; |
895 | 888 | ||