Lines Matching refs:tcp_opt
236 struct tcp_options_received *tcp_opt)
239 u32 options = tcp_opt->rcv_tsecr;
241 if (!tcp_opt->saw_tstamp) {
242 tcp_clear_options(tcp_opt);
249 tcp_opt->sack_ok = (options & TS_OPT_SACK) ? TCP_SACK_SEEN : 0;
251 if (tcp_opt->sack_ok && !READ_ONCE(net->ipv4.sysctl_tcp_sack))
257 tcp_opt->wscale_ok = 1;
258 tcp_opt->snd_wscale = options & TS_OPT_WSCALE_MASK;
264 bool cookie_ecn_ok(const struct tcp_options_received *tcp_opt,
267 bool ecn_ok = tcp_opt->rcv_tsecr & TS_OPT_ECN;
324 struct tcp_options_received tcp_opt;
354 memset(&tcp_opt, 0, sizeof(tcp_opt));
355 tcp_parse_options(sock_net(sk), skb, &tcp_opt, 0, NULL);
357 if (tcp_opt.saw_tstamp && tcp_opt.rcv_tsecr) {
361 tcp_opt.rcv_tsecr -= tsoff;
364 if (!cookie_timestamp_decode(sock_net(sk), &tcp_opt))
385 ireq->snd_wscale = tcp_opt.snd_wscale;
386 ireq->sack_ok = tcp_opt.sack_ok;
387 ireq->wscale_ok = tcp_opt.wscale_ok;
388 ireq->tstamp_ok = tcp_opt.saw_tstamp;
389 req->ts_recent = tcp_opt.saw_tstamp ? tcp_opt.rcv_tsval : 0;
442 ireq->ecn_ok = cookie_ecn_ok(&tcp_opt, sock_net(sk), &rt->dst);