Lines Matching refs:sk
136 struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) in cookie_v6_check() argument
141 struct ipv6_pinfo *np = inet6_sk(sk); in cookie_v6_check()
142 struct tcp_sock *tp = tcp_sk(sk); in cookie_v6_check()
145 struct sock *ret = sk; in cookie_v6_check()
154 if (tcp_synq_no_recent_overflow(sk)) in cookie_v6_check()
159 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED); in cookie_v6_check()
163 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESRECV); in cookie_v6_check()
173 req = inet_reqsk_alloc(&tcp6_request_sock_ops, sk, false); in cookie_v6_check()
181 if (security_inet_conn_request(sk, skb, req)) in cookie_v6_check()
189 if (ipv6_opt_accepted(sk, skb, &TCP_SKB_CB(skb)->header.h6) || in cookie_v6_check()
196 ireq->ir_iif = sk->sk_bound_dev_if; in cookie_v6_check()
198 if (!sk->sk_bound_dev_if && in cookie_v6_check()
202 ireq->ir_mark = inet_request_mark(sk, skb); in cookie_v6_check()
227 fl6.flowi6_oif = sk->sk_bound_dev_if; in cookie_v6_check()
230 fl6.fl6_sport = inet_sk(sk)->inet_sport; in cookie_v6_check()
233 dst = ip6_dst_lookup_flow(sk, &fl6, final_p); in cookie_v6_check()
239 tcp_select_initial_window(tcp_full_space(sk), req->mss, in cookie_v6_check()
245 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), dst); in cookie_v6_check()
247 ret = tcp_get_cookie_sock(sk, skb, req, dst); in cookie_v6_check()