gre: Unify IPTUNNEL_XMIT across kernel versions.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / net / ipip.h
index 2eca5f8..604ece2 100644 (file)
@@ -48,31 +48,11 @@ struct ip_tunnel_prl_entry
        spinlock_t                      lock;
 };
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25)
 #define IPTUNNEL_XMIT() do {                                           \
        int err;                                                        \
        int pkt_len = skb->len - skb_transport_offset(skb);             \
                                                                        \
        skb->ip_summed = CHECKSUM_NONE;                                 \
-       iph->tot_len = htons(skb->len);                                 \
-       ip_select_ident(iph, &rt->u.dst, NULL);                         \
-       ip_send_check(iph);                                             \
-                                                                       \
-       err = NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, rt->u.dst.dev, dst_output);\
-       if (err == NET_XMIT_SUCCESS || err == NET_XMIT_CN) {            \
-               stats->tx_bytes += pkt_len;                             \
-               stats->tx_packets++;                                    \
-       } else {                                                        \
-               stats->tx_errors++;                                     \
-               stats->tx_aborted_errors++;                             \
-       }                                                               \
-} while (0)
-#else
-#define IPTUNNEL_XMIT() do {                                           \
-       int err;                                                        \
-       int pkt_len = skb->len;                                         \
-                                                                       \
-       skb->ip_summed = CHECKSUM_NONE;                                 \
        ip_select_ident(iph, &rt->u.dst, NULL);                         \
                                                                        \
        err = ip_local_out(skb);                                        \
@@ -84,7 +64,6 @@ struct ip_tunnel_prl_entry
                stats->tx_aborted_errors++;                             \
        }                                                               \
 } while (0)
-#endif
 
 #else
 #include_next <net/ipip.h>