/* Queue segment on the new socket if the new socket is active, otherwise we just shortcircuit this and continue with the new socket.  */
int tcp_child_process(struct sock *parent, struct sock *child, struct sk_buff *skb)
/* Queue segment on the new socket if the new socket is active, otherwise we just shortcircuit this and continue with the new socket.  */
int tcp_child_process(struct sock *parent, struct sock *child, struct sk_buff *skb)
{
	int ret = 0;
	int state = child->sk_state;
	if (!sock_owned_by_user(child)) {
		ret = tcp_rcv_state_process(child, skb, tcp_hdr(skb),
					    skb->len);
		if (state == TCP_SYN_RECV && child->sk_state != state)
			parent->sk_data_ready(parent, 0);
	} else {
		sk_add_backlog(child, skb);
	}
	bh_unlock_sock(child);
	sock_put(child);
	return ret;
}