datapath: Backport __ip_select_ident() function
[cascardo/ovs.git] / datapath / linux / compat / ip_tunnels_core.c
index 779075d..a70aefc 100644 (file)
@@ -48,7 +48,7 @@ int iptunnel_xmit(struct rtable *rt,
 
        nf_reset(skb);
        secpath_reset(skb);
-       skb_clear_rxhash(skb);
+       skb_clear_hash(skb);
        skb_dst_drop(skb);
        skb_dst_set(skb, &rt_dst(rt));
 #if 0
@@ -70,7 +70,12 @@ int iptunnel_xmit(struct rtable *rt,
        iph->daddr      =       dst;
        iph->saddr      =       src;
        iph->ttl        =       ttl;
+
+#ifdef HAVE_IP_SELECT_IDENT_USING_DST_ENTRY
        __ip_select_ident(iph, &rt_dst(rt), (skb_shinfo(skb)->gso_segs ?: 1) - 1);
+#else
+       __ip_select_ident(iph, skb_shinfo(skb)->gso_segs ?: 1);
+#endif
 
        err = ip_local_out(skb);
        if (unlikely(net_xmit_eval(err)))
@@ -104,7 +109,7 @@ int iptunnel_pull_header(struct sk_buff *skb, int hdr_len, __be16 inner_proto)
 
        nf_reset(skb);
        secpath_reset(skb);
-       skb_clear_rxhash(skb);
+       skb_clear_hash(skb);
        skb_dst_drop(skb);
        vlan_set_tci(skb, 0);
        skb_set_queue_mapping(skb, 0);