]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv6/ip6_tunnel.c
Merge tag 'dm-3.11-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/agk...
[karo-tx-linux.git] / net / ipv6 / ip6_tunnel.c
index fff83cbc197f1cc22149698d0b8f54fea0d107e8..1e55866cead7425eefdff36c1ddca1aab9504286 100644 (file)
@@ -47,6 +47,7 @@
 
 #include <net/icmp.h>
 #include <net/ip.h>
+#include <net/ip_tunnels.h>
 #include <net/ipv6.h>
 #include <net/ip6_route.h>
 #include <net/addrconf.h>
@@ -955,7 +956,6 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
        unsigned int max_headroom = sizeof(struct ipv6hdr);
        u8 proto;
        int err = -1;
-       int pkt_len;
 
        if (!fl6->flowi6_mark)
                dst = ip6_tnl_dst_check(t);
@@ -1035,19 +1035,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
        ipv6h->nexthdr = proto;
        ipv6h->saddr = fl6->saddr;
        ipv6h->daddr = fl6->daddr;
-       nf_reset(skb);
-       pkt_len = skb->len;
-       err = ip6_local_out(skb);
-
-       if (net_xmit_eval(err) == 0) {
-               struct pcpu_tstats *tstats = this_cpu_ptr(t->dev->tstats);
-
-               tstats->tx_bytes += pkt_len;
-               tstats->tx_packets++;
-       } else {
-               stats->tx_errors++;
-               stats->tx_aborted_errors++;
-       }
+       ip6tunnel_xmit(skb, dev);
        if (ndst)
                ip6_tnl_dst_store(t, ndst);
        return 0;