| /net/ipv4/ |
| A D | tcp_offload.c | 38 struct tcphdr *th; in __tcpv4_gso_segment_csum() local 44 th = tcp_hdr(seg); in __tcpv4_gso_segment_csum() 64 th = tcp_hdr(seg); in __tcpv4_gso_segment_list_csum() 124 th->check = 0; in tcp4_gso_segment() 208 th->fin = th->psh = 0; in tcp_gso_segment() 214 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment() 255 th->check = ~csum_fold(csum_add(csum_unfold(th->check), delta)); in tcp_gso_segment() 259 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment() 309 return th; in tcp_gro_pull_header() 411 if (th->cwr) in tcp_gro_complete() [all …]
|
| A D | syncookies.c | 166 th->source, th->dest, ntohl(th->seq), in __cookie_v4_init_sequence() 174 const struct tcphdr *th = tcp_hdr(skb); in cookie_v4_init_sequence() local 185 __u32 cookie = ntohl(th->ack_seq) - 1; in __cookie_v4_check() 186 __u32 seq = ntohl(th->seq) - 1; in __cookie_v4_check() 190 th->source, th->dest, seq); in __cookie_v4_check() 269 const struct tcphdr *th = tcp_hdr(skb); in cookie_tcp_reqsk_init() local 273 ireq->ir_num = ntohs(th->dest); in cookie_tcp_reqsk_init() 274 ireq->ir_rmt_port = th->source; in cookie_tcp_reqsk_init() 285 treq->rcv_isn = ntohl(th->seq) - 1; in cookie_tcp_reqsk_init() 415 !th->ack || th->rst) in cookie_v4_check() [all …]
|
| A D | tcp_ipv4.c | 625 ip_icmp_error(sk, skb, err, th->dest, info, (u8 *)th); in tcp_v4_err() 764 if (th->rst) in tcp_v4_send_reset() 775 rep.th.dest = th->source; in tcp_v4_send_reset() 776 rep.th.source = th->dest; in tcp_v4_send_reset() 781 rep.th.seq = th->ack_seq; in tcp_v4_send_reset() 784 rep.th.ack_seq = htonl(ntohl(th->seq) + th->syn + th->fin + in tcp_v4_send_reset() 968 rep.th.dest = th->source; in tcp_v4_send_ack() 969 rep.th.source = th->dest; in tcp_v4_send_ack() 1596 memcpy(_th, th, sizeof(*th)); 2073 memcmp(thtail + 1, th + 1, hdrlen - sizeof(*th))) [all …]
|
| A D | tcp_ao.c | 422 th->source, th->dest, sisn, disn); in tcp_v4_ao_calc_key_skb() 465 if (!th->check) { in tcp_ao_hash_pseudoheader() 538 memcpy(hdr, th, sizeof(*th)); in tcp_ao_hash_header() 755 sisn = th->seq; in tcp_ao_prepare_reset() 839 ntohl(th->seq)); in tcp_ao_transmit_skb() 967 sisn = th->seq; in tcp_inbound_ao_hash() 989 if (unlikely(th->syn && !th->ack)) in tcp_inbound_ao_hash() 1028 if (th->syn && !th->ack) in tcp_inbound_ao_hash() 1038 } else if (unlikely(th->ack && !th->syn)) { in tcp_inbound_ao_hash() 1050 if (th->syn || th->rst) in tcp_inbound_ao_hash() [all …]
|
| A D | tcp_minisocks.c | 100 const struct tcphdr *th, u32 *tw_isn, in tcp_timewait_state_process() argument 111 if (th->doff > (sizeof(*th) >> 2) && ts_recent_stamp) { in tcp_timewait_state_process() 134 if (th->rst) in tcp_timewait_state_process() 141 if (!th->ack || in tcp_timewait_state_process() 151 if (!th->fin || in tcp_timewait_state_process() 196 if (th->rst) { in tcp_timewait_state_process() 238 if (th->syn && !th->rst && !th->ack && !paws_reject && in tcp_timewait_state_process() 254 if (!th->rst) { in tcp_timewait_state_process() 261 if (paws_reject || th->ack) in tcp_timewait_state_process() 670 const struct tcphdr *th = tcp_hdr(skb); in tcp_check_req() local [all …]
|
| A D | tcp_input.c | 404 if (tcp_ecn_mode_rfc3168(tp) && (!th->ece || th->cwr)) in tcp_ecn_rcv_synack() 410 if (tcp_ecn_mode_rfc3168(tp) && (!th->ece || !th->cwr)) in tcp_ecn_rcv_syn() 416 if (th->ece && !th->syn && tcp_ecn_mode_rfc3168(tp)) in tcp_ecn_rcv_ecn_echo() 4235 if (th->doff == (sizeof(*th) / 4)) { in tcp_fast_parse_options() 4258 int length = (th->doff << 2) - sizeof(*th); in tcp_do_parse_auth_options() 5835 u32 ptr = tp->urg_seq - ntohl(th->seq) + (th->doff * 4) - in tcp_urg() 5836 th->syn; in tcp_urg() 5886 if (th->rst) in tcp_validate_incoming() 6192 if (!th->ack && !th->rst && !th->syn) { in tcp_rcv_established() 6747 if (!th->ack && !th->rst && !th->syn) { in tcp_rcv_state_process() [all …]
|
| /net/ceph/ |
| A D | auth_x.c | 134 return th; in get_ticket_handler() 138 th = kzalloc(sizeof(*th), GFP_NOFS); in get_ticket_handler() 139 if (!th) in get_ticket_handler() 144 return th; in get_ticket_handler() 152 dout("remove_ticket_handler %p %d\n", th, th->service); in remove_ticket_handler() 157 kfree(th); in remove_ticket_handler() 360 (th->ticket_blob ? th->ticket_blob->vec.iov_len : 0); in ceph_x_build_authorizer() 399 dout(" th %p secret_id %lld %lld\n", th, th->secret_id, in ceph_x_build_authorizer() 449 if (th->have_key && ktime_get_real_seconds() >= th->expires) { in have_key() 451 ceph_entity_type_name(th->service), th->secret_id); in have_key() [all …]
|
| /net/netfilter/ |
| A D | nf_synproxy_core.c | 31 int length = (th->doff * 4) - sizeof(*th); in synproxy_parse_options() 514 nth->dest = th->dest; in synproxy_send_server_syn() 597 nth->dest = th->dest; in synproxy_send_client_ack() 666 if (!th) in ipv4_synproxy_hook() 678 if (!th->syn || th->ack || in ipv4_synproxy_hook() 694 if (!th->syn && th->ack && in ipv4_synproxy_hook() 717 if (!th->syn || !th->ack) in ipv4_synproxy_hook() 1089 if (!th) in ipv6_synproxy_hook() 1101 if (!th->syn || th->ack || in ipv6_synproxy_hook() 1117 if (!th->syn && th->ack && in ipv6_synproxy_hook() [all …]
|
| A D | xt_tcpmss.c | 28 const struct tcphdr *th; in tcpmss_mt() local 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcpmss_mt() 37 if (th == NULL) in tcpmss_mt() 41 if (th->doff*4 < sizeof(*th)) in tcpmss_mt() 44 optlen = th->doff*4 - sizeof(*th); in tcpmss_mt() 49 op = skb_header_pointer(skb, par->thoff + sizeof(*th), optlen, _opt); in tcpmss_mt()
|
| A D | xt_ecn.c | 31 const struct tcphdr *th; in match_tcp() local 36 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in match_tcp() 37 if (th == NULL) in match_tcp() 42 if (th->ece == 1) in match_tcp() 45 if (th->ece == 0) in match_tcp() 52 if (th->cwr == 1) in match_tcp() 55 if (th->cwr == 0) in match_tcp()
|
| A D | nf_conntrack_proto_tcp.c | 811 if (th->doff*4 < sizeof(struct tcphdr) || tcplen < th->doff*4) { in tcp_error() 840 const struct tcphdr *th, in tcp_new() argument 861 dataoff, th); in tcp_new() 881 dataoff, th); in tcp_new() 975 const struct tcphdr *th; in nf_conntrack_tcp_packet() local 980 if (th == NULL) in nf_conntrack_tcp_packet() 992 index = get_conntrack_index(th); in nf_conntrack_tcp_packet() 1074 segment_seq_plus_len(ntohl(th->seq), skb->len, dataoff, th); in nf_conntrack_tcp_packet() 1188 u32 seq = ntohl(th->seq); in nf_conntrack_tcp_packet() 1254 skb, dataoff, th, state); in nf_conntrack_tcp_packet() [all …]
|
| A D | nf_log_syslog.c | 200 if (!th) { in nf_log_dump_tcp_header() 207 ntohs(th->source), ntohs(th->dest)); in nf_log_dump_tcp_header() 211 ntohl(th->seq), ntohl(th->ack_seq)); in nf_log_dump_tcp_header() 220 if (th->ae) in nf_log_dump_tcp_header() 222 if (th->cwr) in nf_log_dump_tcp_header() 224 if (th->ece) in nf_log_dump_tcp_header() 226 if (th->urg) in nf_log_dump_tcp_header() 228 if (th->ack) in nf_log_dump_tcp_header() 230 if (th->psh) in nf_log_dump_tcp_header() 232 if (th->rst) in nf_log_dump_tcp_header() [all …]
|
| A D | xt_tcpudp.c | 71 const struct tcphdr *th; in tcp_mt() local 90 th = skb_header_pointer(skb, par->thoff, sizeof(_tcph), &_tcph); in tcp_mt() 91 if (th == NULL) { in tcp_mt() 100 ntohs(th->source), in tcp_mt() 104 ntohs(th->dest), in tcp_mt() 108 (((unsigned char *)th)[13] & tcpinfo->flg_mask) == tcpinfo->flg_cmp)) in tcp_mt() 111 if (th->doff * 4 < sizeof(_tcph)) { in tcp_mt() 116 th->doff*4 - sizeof(_tcph), in tcp_mt()
|
| A D | nf_conntrack_irc.c | 112 const struct tcphdr *th; in help() local 136 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help() 137 if (th == NULL) in help() 141 dataoff = protoff + th->doff*4; in help() 194 &iph->saddr, ntohs(th->source), in help() 195 &iph->daddr, ntohs(th->dest)); in help()
|
| A D | nf_conntrack_sane.c | 64 const struct tcphdr *th; in help() local 83 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help() 84 if (th == NULL) in help() 88 dataoff = protoff + th->doff * 4; in help()
|
| A D | nf_conntrack_ftp.c | 375 const struct tcphdr *th; in help() local 400 th = skb_header_pointer(skb, protoff, sizeof(_tcph), &_tcph); in help() 401 if (th == NULL) in help() 404 dataoff = protoff + th->doff * 4; in help() 418 seq = ntohl(th->seq) + datalen; in help() 421 if (!find_nl_seq(ntohl(th->seq), ct_ftp_info, dir)) { in help() 472 matchlen, ntohl(th->seq) + matchoff); in help()
|
| /net/ipv6/ |
| A D | tcpv6_offload.c | 18 struct tcphdr *th) in tcp6_check_fraglist_gro() argument 30 p = tcp_gro_lookup(head, th); in tcp6_check_fraglist_gro() 40 &hdr->saddr, th->source, in tcp6_check_fraglist_gro() 52 struct tcphdr *th; in tcp6_gro_receive() local 60 th = tcp_gro_pull_header(skb); in tcp6_gro_receive() 61 if (!th) in tcp6_gro_receive() 120 const struct tcphdr *th; in __tcpv6_gso_segment_list_csum() local 127 th = tcp_hdr(seg); in __tcpv6_gso_segment_list_csum() 144 &th2->dest, th->dest); in __tcpv6_gso_segment_list_csum() 163 struct tcphdr *th; in tcp6_gso_segment() local [all …]
|
| A D | syncookies.c | 93 const struct tcphdr *th, __u16 *mssp) in __cookie_v6_init_sequence() argument 104 return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, in __cookie_v6_init_sequence() 105 th->dest, ntohl(th->seq), mssind); in __cookie_v6_init_sequence() 112 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_init_sequence() local 114 return __cookie_v6_init_sequence(iph, th, mssp); in cookie_v6_init_sequence() 117 int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th) in __cookie_v6_check() argument 119 __u32 cookie = ntohl(th->ack_seq) - 1; in __cookie_v6_check() 120 __u32 seq = ntohl(th->seq) - 1; in __cookie_v6_check() 124 th->source, th->dest, seq); in __cookie_v6_check() 170 const struct tcphdr *th = tcp_hdr(skb); in cookie_v6_check() local [all …]
|
| A D | tcp_ipv6.c | 408 seq = ntohl(th->seq); in tcp_v6_err() 494 ipv6_icmp_error(sk, skb, err, th->dest, ntohl(info), (u8 *)th); in tcp_v6_err() 710 memcpy(_th, th, sizeof(*th)); in tcp_v6_md5_hash_headers() 730 if (tcp_v6_md5_hash_headers(&hp, daddr, saddr, th, th->doff << 2)) in tcp_v6_md5_hash_hdr() 1037 if (th->rst) in tcp_v6_send_reset() 1099 if (th->ack) in tcp_v6_send_reset() 1102 ack_seq = ntohl(th->seq) + th->syn + th->fin + skb->len - in tcp_v6_send_reset() 1305 if (!th->syn) 1740 TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + 1793 th->source, th->dest, inet6_iif(skb), sdif, [all …]
|
| /net/ipv4/netfilter/ |
| A D | ipt_SYNPROXY.c | 19 struct tcphdr *th, _th; in synproxy_tg4() local 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg4() 25 if (th == NULL) in synproxy_tg4() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg4() 31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg4() 35 if (th->ece && th->cwr) in synproxy_tg4() 48 synproxy_send_client_synack(net, skb, th, &opts); in synproxy_tg4() 51 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg4() 53 if (synproxy_recv_client_ack(net, skb, th, &opts, ntohl(th->seq))) { in synproxy_tg4()
|
| /net/ipv6/netfilter/ |
| A D | ip6t_SYNPROXY.c | 19 struct tcphdr *th, _th; in synproxy_tg6() local 24 th = skb_header_pointer(skb, par->thoff, sizeof(_th), &_th); in synproxy_tg6() 25 if (th == NULL) in synproxy_tg6() 28 if (!synproxy_parse_options(skb, par->thoff, th, &opts)) in synproxy_tg6() 31 if (th->syn && !(th->ack || th->fin || th->rst)) { in synproxy_tg6() 35 if (th->ece && th->cwr) in synproxy_tg6() 48 synproxy_send_client_synack_ipv6(net, skb, th, &opts); in synproxy_tg6() 52 } else if (th->ack && !(th->fin || th->rst || th->syn)) { in synproxy_tg6() 54 if (synproxy_recv_client_ack_ipv6(net, skb, th, &opts, in synproxy_tg6() 55 ntohl(th->seq))) { in synproxy_tg6()
|
| /net/netfilter/ipvs/ |
| A D | ip_vs_app.c | 290 __u32 seq = ntohl(th->seq); in vs_fix_seq() 299 th->seq = htonl(seq + vseq->delta); in vs_fix_seq() 317 __u32 ack_seq = ntohl(th->ack_seq); in vs_fix_ack_seq() 366 struct tcphdr *th; in app_tcp_pkt_out() local 377 seq = ntohl(th->seq); in app_tcp_pkt_out() 383 vs_fix_seq(&cp->out_seq, th); in app_tcp_pkt_out() 385 vs_fix_ack_seq(&cp->in_seq, th); in app_tcp_pkt_out() 443 struct tcphdr *th; in app_tcp_pkt_in() local 454 seq = ntohl(th->seq); in app_tcp_pkt_in() 460 vs_fix_seq(&cp->in_seq, th); in app_tcp_pkt_in() [all …]
|
| A D | ip_vs_proto_tcp.c | 41 struct tcphdr _tcph, *th; in tcp_conn_schedule() local 50 if (th) { in tcp_conn_schedule() 51 if (th->rst || !(sysctl_sloppy_tcp(ipvs) || th->syn)) in tcp_conn_schedule() 53 ports = &th->source; in tcp_conn_schedule() 500 if (th->rst) in tcp_state_idx() 502 if (th->syn) in tcp_state_idx() 504 if (th->fin) in tcp_state_idx() 506 if (th->ack) in tcp_state_idx() 547 th->syn ? 'S' : '.', in set_tcp_state() 592 struct tcphdr _tcph, *th; in tcp_state_transition() local [all …]
|
| /net/netfilter/ipset/ |
| A D | ip_set_getport.c | 31 const struct tcphdr *th; in get_port() local 33 th = skb_header_pointer(skb, protooff, sizeof(_tcph), &_tcph); in get_port() 34 if (!th) in get_port() 38 *port = src ? th->source : th->dest; in get_port()
|
| /net/mptcp/ |
| A D | syncookies.c | 41 struct tcphdr *th = tcp_hdr(skb); in mptcp_join_entry_hash() local 47 if (th->syn) in mptcp_join_entry_hash() 53 (__force __u32)th->source << 16 | (__force __u32)th->dest, in mptcp_join_entry_hash()
|