inetpeer: get rid of ip_id_count
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / xfrm4_mode_tunnel.c
index b5663c37f089ed0afe33115bcbfad2555b8d0f48..e3f64831bc369fd2217b2ad4858ec64877b45f0a 100644 (file)
@@ -117,12 +117,12 @@ static int xfrm4_mode_tunnel_output(struct xfrm_state *x, struct sk_buff *skb)
 
        top_iph->frag_off = (flags & XFRM_STATE_NOPMTUDISC) ?
                0 : (XFRM_MODE_SKB_CB(skb)->frag_off & htons(IP_DF));
-       ip_select_ident(skb, dst->child, NULL);
 
        top_iph->ttl = ip4_dst_hoplimit(dst->child);
 
        top_iph->saddr = x->props.saddr.a4;
        top_iph->daddr = x->id.daddr.a4;
+       ip_select_ident(skb, NULL);
 
        return 0;
 }