Lines Matching refs:tcp_opt
248 bool cookie_timestamp_decode(struct tcp_options_received *tcp_opt) in cookie_timestamp_decode() argument
251 u32 options = tcp_opt->rcv_tsecr; in cookie_timestamp_decode()
253 if (!tcp_opt->saw_tstamp) { in cookie_timestamp_decode()
254 tcp_clear_options(tcp_opt); in cookie_timestamp_decode()
261 tcp_opt->sack_ok = (options & TS_OPT_SACK) ? TCP_SACK_SEEN : 0; in cookie_timestamp_decode()
263 if (tcp_opt->sack_ok && !sysctl_tcp_sack) in cookie_timestamp_decode()
269 tcp_opt->wscale_ok = 1; in cookie_timestamp_decode()
270 tcp_opt->snd_wscale = options & TS_OPT_WSCALE_MASK; in cookie_timestamp_decode()
276 bool cookie_ecn_ok(const struct tcp_options_received *tcp_opt, in cookie_ecn_ok() argument
279 bool ecn_ok = tcp_opt->rcv_tsecr & TS_OPT_ECN; in cookie_ecn_ok()
294 struct tcp_options_received tcp_opt; in cookie_v4_check() local
322 memset(&tcp_opt, 0, sizeof(tcp_opt)); in cookie_v4_check()
323 tcp_parse_options(skb, &tcp_opt, 0, NULL); in cookie_v4_check()
325 if (!cookie_timestamp_decode(&tcp_opt)) in cookie_v4_check()
343 ireq->snd_wscale = tcp_opt.snd_wscale; in cookie_v4_check()
344 ireq->sack_ok = tcp_opt.sack_ok; in cookie_v4_check()
345 ireq->wscale_ok = tcp_opt.wscale_ok; in cookie_v4_check()
346 ireq->tstamp_ok = tcp_opt.saw_tstamp; in cookie_v4_check()
347 req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0; in cookie_v4_check()
348 treq->snt_synack = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsecr : 0; in cookie_v4_check()
392 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), &rt->dst); in cookie_v4_check()