/* Peer allocation may fail only in serious out-of-memory conditions. However we still can generate some output. Random ID selection looks a bit dangerous because we have no chances to select ID being unique in a reasonable period of time. But broken packet identifier may be better than no packet at all.  */
static void ip_select_fb_ident(struct iphdr *iph)
/* Peer allocation may fail only in serious out-of-memory conditions. However we still can generate some output. Random ID selection looks a bit dangerous because we have no chances to select ID being unique in a reasonable period of time. But broken packet identifier may be better than no packet at all.  */
static void ip_select_fb_ident(struct iphdr *iph)
{
	static DEFINE_SPINLOCK(ip_fb_id_lock);
	static u32 ip_fallback_id;
	u32 salt;
	spin_lock_bh(&ip_fb_id_lock);
	salt = secure_ip_id((__force __be32)ip_fallback_id ^ iph->daddr);
	iph->id = htons(salt & 0xFFFF);
	ip_fallback_id = salt;
	spin_unlock_bh(&ip_fb_id_lock);
}