NETDEBUG(if (net_ratelimit()) \ printk(KERN_DEBUG "TCP: drop open " "request from %u.%u." "%u.%u/%u\n", \ NIPQUAD(saddr), ntohs(skb->h.th->source))); 
LIMIT_NETDEBUG(printk(KERN_DEBUG "TCP: drop open " "request from %u.%u." "%u.%u/%u\n", NIPQUAD(saddr), ntohs(skb->h.th->source))); 
int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb){	struct inet_request_sock *ireq;	struct tcp_options_received tmp_opt;	struct request_sock *req;	__u32 saddr = skb->nh.iph->saddr;	__u32 daddr = skb->nh.iph->daddr;	__u32 isn = TCP_SKB_CB(skb)->when;	struct dst_entry *dst = NULL;#ifdef CONFIG_SYN_COOKIES	int want_cookie = 0;#else#define want_cookie 0 /* Argh, why doesn't gcc optimize this :( */#endif	/* Never answer to SYNs send to broadcast or multicast */	if (((struct rtable *)skb->dst)->rt_flags &	    (RTCF_BROADCAST | RTCF_MULTICAST))		goto drop;	/* TW buckets are converted to open requests without	 * limitations, they conserve resources and peer is	 * evidently real one.	 */	if (tcp_synq_is_full(sk) && !isn) {#ifdef CONFIG_SYN_COOKIES		if (sysctl_tcp_syncookies) {			want_cookie = 1;		} else#endif		goto drop;	}	/* Accept backlog is full. If we have already queued enough	 * of warm entries in syn queue, drop request. It is better than	 * clogging syn queue with openreqs with exponentially increasing	 * timeout.	 */	if (sk_acceptq_is_full(sk) && tcp_synq_young(sk) > 1)		goto drop;	req = reqsk_alloc(&tcp_request_sock_ops);	if (!req)		goto drop;	tcp_clear_options(&tmp_opt);	tmp_opt.mss_clamp = 536;	tmp_opt.user_mss  = tcp_sk(sk)->rx_opt.user_mss;	tcp_parse_options(skb, &tmp_opt, 0);	if (want_cookie) {		tcp_clear_options(&tmp_opt);		tmp_opt.saw_tstamp = 0;	}	if (tmp_opt.saw_tstamp && !tmp_opt.rcv_tsval) {		/* Some OSes (unknown ones, but I see them on web server, which		 * contains information interesting only for windows'		 * users) do not send their stamp in SYN. It is easy case.		 * We simply do not advertise TS support.		 */		tmp_opt.saw_tstamp = 0;		tmp_opt.tstamp_ok  = 0;	}	tmp_opt.tstamp_ok = tmp_opt.saw_tstamp;	tcp_openreq_init(req, &tmp_opt, skb);	ireq = inet_rsk(req);	ireq->loc_addr = daddr;	ireq->rmt_addr = saddr;	ireq->opt = tcp_v4_save_options(sk, skb);	if (!want_cookie)		TCP_ECN_create_request(req, skb->h.th);	if (want_cookie) {#ifdef CONFIG_SYN_COOKIES		syn_flood_warning(skb);#endif		isn = cookie_v4_init_sequence(sk, skb, &req->mss);	} else if (!isn) {		struct inet_peer *peer = NULL;		/* VJ's idea. We save last timestamp seen		 * from the destination in peer table, when entering		 * state TIME-WAIT, and check against it before		 * accepting new connection request.		 *		 * If "isn" is not zero, this request hit alive		 * timewait bucket, so that all the necessary checks		 * are made in the function processing timewait state.		 */		if (tmp_opt.saw_tstamp &&		    sysctl_tcp_tw_recycle &&		    (dst = tcp_v4_route_req(sk, req)) != NULL &&		    (peer = rt_get_peer((struct rtable *)dst)) != NULL &&		    peer->v4daddr == saddr) {			if (xtime.tv_sec < peer->tcp_ts_stamp + TCP_PAWS_MSL &&			    (s32)(peer->tcp_ts - req->ts_recent) >							TCP_PAWS_WINDOW) {				NET_INC_STATS_BH(LINUX_MIB_PAWSPASSIVEREJECTED);				dst_release(dst);				goto drop_and_free;			}		}		/* Kill the following clause, if you dislike this way. */		else if (!sysctl_tcp_syncookies &&			 (sysctl_max_syn_backlog - tcp_synq_len(sk) <			  (sysctl_max_syn_backlog >> 2)) &&			 (!peer || !peer->tcp_ts_stamp) &&			 (!dst || !dst_metric(dst, RTAX_RTT))) {			/* Without syncookies last quarter of			 * backlog is filled with destinations,			 * proven to be alive.			 * It means that we continue to communicate			 * to destinations, already remembered			 * to the moment of synflood.			 */			NETDEBUG(if (net_ratelimit()) \					printk(KERN_DEBUG "TCP: drop open "							  "request from %u.%u."							  "%u.%u/%u\n", \					       NIPQUAD(saddr),					       ntohs(skb->h.th->source)));			dst_release(dst);			goto drop_and_free;		}		isn = tcp_v4_init_sequence(sk, skb);	}	tcp_rsk(req)->snt_isn = isn;	if (tcp_v4_send_synack(sk, req, dst))		goto drop_and_free;	if (want_cookie) {	   	reqsk_free(req);	} else {		tcp_v4_synq_add(sk, req);	}	return 0;drop_and_free:	reqsk_free(req);drop:	TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca9334523c853e407da7b3a0bd02f54d0fa59414/tcp_ipv4.c/clean/net/ipv4/tcp_ipv4.c