tcp_v4_checksum_init(skb) < 0)) 
tcp_v4_checksum_init(skb))) 
int tcp_v4_rcv(struct sk_buff *skb){	struct tcphdr *th;	struct sock *sk;	int ret;	if (skb->pkt_type != PACKET_HOST)		goto discard_it;	/* Count it even if it's bad */	TCP_INC_STATS_BH(TCP_MIB_INSEGS);	if (!pskb_may_pull(skb, sizeof(struct tcphdr)))		goto discard_it;	th = skb->h.th;	if (th->doff < sizeof(struct tcphdr) / 4)		goto bad_packet;	if (!pskb_may_pull(skb, th->doff * 4))		goto discard_it;	/* An explanation is required here, I think.	 * Packet length and doff are validated by header prediction,	 * provided case of th->doff==0 is elimineted.	 * So, we defer the checks. */	if ((skb->ip_summed != CHECKSUM_UNNECESSARY &&	     tcp_v4_checksum_init(skb) < 0))		goto bad_packet;	th = skb->h.th;	TCP_SKB_CB(skb)->seq = ntohl(th->seq);	TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin +				    skb->len - th->doff * 4);	TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq);	TCP_SKB_CB(skb)->when	 = 0;	TCP_SKB_CB(skb)->flags	 = skb->nh.iph->tos;	TCP_SKB_CB(skb)->sacked	 = 0;	sk = __inet_lookup(&tcp_hashinfo, skb->nh.iph->saddr, th->source,			   skb->nh.iph->daddr, ntohs(th->dest),			   inet_iif(skb));	if (!sk)		goto no_tcp_socket;process:	if (sk->sk_state == TCP_TIME_WAIT)		goto do_time_wait;	if (!xfrm4_policy_check(sk, XFRM_POLICY_IN, skb))		goto discard_and_relse;	if (sk_filter(sk, skb, 0))		goto discard_and_relse;	skb->dev = NULL;	bh_lock_sock(sk);	ret = 0;	if (!sock_owned_by_user(sk)) {		if (!tcp_prequeue(sk, skb))			ret = tcp_v4_do_rcv(sk, skb);	} else		sk_add_backlog(sk, skb);	bh_unlock_sock(sk);	sock_put(sk);	return ret;no_tcp_socket:	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))		goto discard_it;	if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) {bad_packet:		TCP_INC_STATS_BH(TCP_MIB_INERRS);	} else {		tcp_v4_send_reset(skb);	}discard_it:	/* Discard frame. */	kfree_skb(skb);  	return 0;discard_and_relse:	sock_put(sk);	goto discard_it;do_time_wait:	if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {		inet_twsk_put((struct inet_timewait_sock *) sk);		goto discard_it;	}	if (skb->len < (th->doff << 2) || tcp_checksum_complete(skb)) {		TCP_INC_STATS_BH(TCP_MIB_INERRS);		inet_twsk_put((struct inet_timewait_sock *) sk);		goto discard_it;	}	switch (tcp_timewait_state_process((struct inet_timewait_sock *)sk,					   skb, th)) {	case TCP_TW_SYN: {		struct sock *sk2 = inet_lookup_listener(&tcp_hashinfo,							skb->nh.iph->daddr,							ntohs(th->dest),							inet_iif(skb));		if (sk2) {			inet_twsk_deschedule((struct inet_timewait_sock *)sk,					     &tcp_death_row);			inet_twsk_put((struct inet_timewait_sock *)sk);			sk = sk2;			goto process;		}		/* Fall through to ACK */	}	case TCP_TW_ACK:		tcp_v4_timewait_ack(sk, skb);		break;	case TCP_TW_RST:		goto no_tcp_socket;	case TCP_TW_SUCCESS:;	}	goto discard_it;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/fb286bb2990a107009dbf25f6ffebeb7df77f9be/tcp_ipv4.c/buggy/net/ipv4/tcp_ipv4.c