Lines Matching refs:th

29 		       const struct tcphdr *th, struct synproxy_options *opts)
31 int length = (th->doff * 4) - sizeof(*th);
37 ptr = skb_header_pointer(skb, doff + sizeof(*th), length, buf);
115 synproxy_build_options(struct tcphdr *th, const struct synproxy_options *opts)
117 __be32 *ptr = (__be32 *)(th + 1);
186 struct tcphdr *th, struct nf_conn *ct,
197 optend = protoff + th->doff * 4;
229 inet_proto_csum_replace4(&th->check, skb,
448 const struct sk_buff *skb, const struct tcphdr *th,
470 nth->source = th->dest;
471 nth->dest = th->source;
472 nth->seq = htonl(__cookie_v4_init_sequence(iph, th, &mss));
473 nth->ack_seq = htonl(ntohl(th->seq) + 1);
491 const struct sk_buff *skb, const struct tcphdr *th,
513 nth->source = th->source;
514 nth->dest = th->dest;
519 nth->ack_seq = htonl(ntohl(th->ack_seq) - 1);
524 nth->window = th->window;
537 const struct sk_buff *skb, const struct tcphdr *th,
558 nth->source = th->dest;
559 nth->dest = th->source;
560 nth->seq = htonl(ntohl(th->ack_seq));
561 nth->ack_seq = htonl(ntohl(th->seq) + 1);
575 const struct sk_buff *skb, const struct tcphdr *th,
596 nth->source = th->source;
597 nth->dest = th->dest;
598 nth->seq = htonl(ntohl(th->seq) + 1);
599 nth->ack_seq = th->ack_seq;
602 nth->window = htons(ntohs(th->window) >> opts->wscale);
614 const struct sk_buff *skb, const struct tcphdr *th,
620 mss = __cookie_v4_check(ip_hdr(skb), th);
633 synproxy_send_server_syn(net, skb, th, opts, recv_seq);
649 struct tcphdr *th, _th;
665 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th);
666 if (!th)
672 if (th->rst && CTINFO2DIR(ctinfo) != IP_CT_DIR_ORIGINAL) {
674 ntohl(th->seq) + 1);
678 if (!th->syn || th->ack ||
691 if (!synproxy_parse_options(skb, thoff, th, &opts))
694 if (!th->syn && th->ack &&
700 if (synproxy_recv_client_ack(net, skb, th, &opts,
701 ntohl(th->seq) + 1)) {
710 synproxy->isn = ntohl(th->ack_seq);
717 if (!th->syn || !th->ack)
720 if (!synproxy_parse_options(skb, thoff, th, &opts))
733 synproxy_send_server_ack(net, state, skb, th, &opts);
735 nf_ct_seqadj_init(ct, ctinfo, synproxy->isn - ntohl(th->seq));
739 synproxy_send_client_ack(net, skb, th, &opts);
747 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy);
861 const struct tcphdr *th,
883 nth->source = th->dest;
884 nth->dest = th->source;
885 nth->seq = htonl(nf_ipv6_cookie_init_sequence(iph, th, &mss));
886 nth->ack_seq = htonl(ntohl(th->seq) + 1);
905 const struct tcphdr *th,
927 nth->source = th->source;
928 nth->dest = th->dest;
933 nth->ack_seq = htonl(ntohl(th->ack_seq) - 1);
938 nth->window = th->window;
951 const struct tcphdr *th,
972 nth->source = th->dest;
973 nth->dest = th->source;
974 nth->seq = htonl(ntohl(th->ack_seq));
975 nth->ack_seq = htonl(ntohl(th->seq) + 1);
990 const struct tcphdr *th,
1011 nth->source = th->source;
1012 nth->dest = th->dest;
1013 nth->seq = htonl(ntohl(th->seq) + 1);
1014 nth->ack_seq = th->ack_seq;
1017 nth->window = htons(ntohs(th->window) >> opts->wscale);
1031 const struct tcphdr *th,
1037 mss = nf_cookie_v6_check(ipv6_hdr(skb), th);
1050 synproxy_send_server_syn_ipv6(net, skb, th, opts, recv_seq);
1066 struct tcphdr *th, _th;
1088 th = skb_header_pointer(skb, thoff, sizeof(_th), &_th);
1089 if (!th)
1095 if (th->rst && CTINFO2DIR(ctinfo) != IP_CT_DIR_ORIGINAL) {
1097 ntohl(th->seq) + 1);
1101 if (!th->syn || th->ack ||
1114 if (!synproxy_parse_options(skb, thoff, th, &opts))
1117 if (!th->syn && th->ack &&
1123 if (synproxy_recv_client_ack_ipv6(net, skb, th, &opts,
1124 ntohl(th->seq) + 1)) {
1133 synproxy->isn = ntohl(th->ack_seq);
1140 if (!th->syn || !th->ack)
1143 if (!synproxy_parse_options(skb, thoff, th, &opts))
1156 synproxy_send_server_ack_ipv6(net, state, skb, th, &opts);
1158 nf_ct_seqadj_init(ct, ctinfo, synproxy->isn - ntohl(th->seq));
1162 synproxy_send_client_ack_ipv6(net, skb, th, &opts);
1170 synproxy_tstamp_adjust(skb, thoff, th, ct, ctinfo, synproxy);