Lines Matching refs:sk

218 struct sock *tcp_get_cookie_sock(struct sock *sk, struct sk_buff *skb,  in tcp_get_cookie_sock()  argument
222 struct inet_connection_sock *icsk = inet_csk(sk); in tcp_get_cookie_sock()
226 child = icsk->icsk_af_ops->syn_recv_sock(sk, skb, req, dst, in tcp_get_cookie_sock()
231 inet_csk_reqsk_queue_add(sk, req, child); in tcp_get_cookie_sock()
294 struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb) in cookie_v4_check() argument
300 struct tcp_sock *tp = tcp_sk(sk); in cookie_v4_check()
303 struct sock *ret = sk; in cookie_v4_check()
313 if (tcp_synq_no_recent_overflow(sk)) in cookie_v4_check()
318 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED); in cookie_v4_check()
322 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESRECV); in cookie_v4_check()
332 req = inet_reqsk_alloc(&tcp_request_sock_ops, sk, false); /* for safety */ in cookie_v4_check()
345 ireq->ir_mark = inet_request_mark(sk, skb); in cookie_v4_check()
354 ireq->ir_iif = sk->sk_bound_dev_if; in cookie_v4_check()
361 if (security_inet_conn_request(sk, skb, req)) { in cookie_v4_check()
374 flowi4_init_output(&fl4, sk->sk_bound_dev_if, ireq->ir_mark, in cookie_v4_check()
375 RT_CONN_FLAGS(sk), RT_SCOPE_UNIVERSE, IPPROTO_TCP, in cookie_v4_check()
376 inet_sk_flowi_flags(sk), in cookie_v4_check()
380 rt = ip_route_output_key(sock_net(sk), &fl4); in cookie_v4_check()
389 tcp_select_initial_window(tcp_full_space(sk), req->mss, in cookie_v4_check()
395 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), &rt->dst); in cookie_v4_check()
397 ret = tcp_get_cookie_sock(sk, skb, req, &rt->dst); in cookie_v4_check()