Lines Matching refs:sk

44 static inline struct sock *get_cookie_sock(struct sock *sk, struct sk_buff *skb,  in get_cookie_sock()  argument
48 struct inet_connection_sock *icsk = inet_csk(sk); in get_cookie_sock()
51 child = icsk->icsk_af_ops->syn_recv_sock(sk, skb, req, dst); in get_cookie_sock()
54 inet_csk_reqsk_queue_add(sk, req, child); in get_cookie_sock()
134 __u32 cookie_v6_init_sequence(struct sock *sk, const struct sk_buff *skb, __u16 *mssp) in cookie_v6_init_sequence() argument
139 tcp_synq_overflow(sk); in cookie_v6_init_sequence()
140 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESSENT); in cookie_v6_init_sequence()
156 struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) in cookie_v6_check() argument
161 struct ipv6_pinfo *np = inet6_sk(sk); in cookie_v6_check()
162 struct tcp_sock *tp = tcp_sk(sk); in cookie_v6_check()
165 struct sock *ret = sk; in cookie_v6_check()
174 if (tcp_synq_no_recent_overflow(sk)) in cookie_v6_check()
179 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED); in cookie_v6_check()
183 NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESRECV); in cookie_v6_check()
193 req = inet_reqsk_alloc(&tcp6_request_sock_ops, sk); in cookie_v6_check()
201 if (security_inet_conn_request(sk, skb, req)) in cookie_v6_check()
209 if (ipv6_opt_accepted(sk, skb, &TCP_SKB_CB(skb)->header.h6) || in cookie_v6_check()
216 ireq->ir_iif = sk->sk_bound_dev_if; in cookie_v6_check()
218 if (!sk->sk_bound_dev_if && in cookie_v6_check()
222 ireq->ir_mark = inet_request_mark(sk, skb); in cookie_v6_check()
247 fl6.flowi6_oif = sk->sk_bound_dev_if; in cookie_v6_check()
250 fl6.fl6_sport = inet_sk(sk)->inet_sport; in cookie_v6_check()
253 dst = ip6_dst_lookup_flow(sk, &fl6, final_p); in cookie_v6_check()
259 tcp_select_initial_window(tcp_full_space(sk), req->mss, in cookie_v6_check()
265 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), dst); in cookie_v6_check()
267 ret = get_cookie_sock(sk, skb, req, dst); in cookie_v6_check()