| /net/netfilter/ |
| A D | nf_conntrack_seqadj.c | 76 struct tcphdr *tcph, in nf_ct_sack_block_adjust() argument 127 optend = protoff + tcph->doff * 4; in nf_ct_sack_adjust() 132 tcph = (void *)skb->data + protoff; in nf_ct_sack_adjust() 169 struct tcphdr *tcph; in nf_ct_seq_adjust() local 182 tcph = (void *)skb->data + protoff; in nf_ct_seq_adjust() 190 inet_proto_csum_replace4(&tcph->check, skb, tcph->seq, newseq, false); in nf_ct_seq_adjust() 193 tcph->seq = newseq; in nf_ct_seq_adjust() 195 if (!tcph->ack) in nf_ct_seq_adjust() 205 inet_proto_csum_replace4(&tcph->check, skb, tcph->ack_seq, newack, in nf_ct_seq_adjust() 208 ntohl(tcph->seq), ntohl(newseq), ntohl(tcph->ack_seq), in nf_ct_seq_adjust() [all …]
|
| A D | nft_exthdr.c | 172 struct tcphdr *tcph; in nft_tcp_header_pointer() local 178 if (!tcph) in nft_tcp_header_pointer() 196 struct tcphdr *tcph; in nft_exthdr_tcp_eval() local 200 if (!tcph) in nft_exthdr_tcp_eval() 203 opt = (u8 *)tcph; in nft_exthdr_tcp_eval() 239 struct tcphdr *tcph; in nft_exthdr_tcp_set_eval() local 243 if (!tcph) in nft_exthdr_tcp_set_eval() 250 opt = (u8 *)tcph; in nft_exthdr_tcp_set_eval() 319 struct tcphdr *tcph; in nft_exthdr_tcp_strip_eval() local 323 if (!tcph) in nft_exthdr_tcp_strip_eval() [all …]
|
| A D | xt_TCPOPTSTRIP.c | 34 struct tcphdr *tcph, _th; in tcpoptstrip_mangle_packet() local 44 tcph = skb_header_pointer(skb, tcphoff, sizeof(_th), &_th); in tcpoptstrip_mangle_packet() 45 if (!tcph) in tcpoptstrip_mangle_packet() 48 tcp_hdrlen = tcph->doff * 4; in tcpoptstrip_mangle_packet() 56 tcph = (struct tcphdr *)(skb_network_header(skb) + tcphoff); in tcpoptstrip_mangle_packet() 57 opt = (u8 *)tcph; in tcpoptstrip_mangle_packet() 79 inet_proto_csum_replace2(&tcph->check, skb, htons(o), in tcpoptstrip_mangle_packet()
|
| A D | nf_conntrack_proto_tcp.c | 278 else if (tcph->syn) return (tcph->ack ? TCP_SYNACK_SET : TCP_SYN_SET); in get_conntrack_index() 321 + (tcph->syn ? 1 : 0) + (tcph->fin ? 1 : 0)); in segment_seq_plus_len() 526 seq = ntohl(tcph->seq); in tcp_in_window() 544 if (tcph->syn) { in tcp_in_window() 546 skb, dataoff, tcph, in tcp_in_window() 548 if (!tcph->ack) in tcp_in_window() 576 } else if (tcph->syn && in tcp_in_window() 589 skb, dataoff, tcph, in tcp_in_window() 596 if (!(tcph->ack)) { in tcp_in_window() 670 if (!tcph->syn) in tcp_in_window() [all …]
|
| A D | nf_nat_helper.c | 95 struct tcphdr *tcph; in __nf_nat_mangle_tcp_packet() local 106 tcph = (void *)skb->data + protoff; in __nf_nat_mangle_tcp_packet() 109 mangle_contents(skb, protoff + tcph->doff*4, in __nf_nat_mangle_tcp_packet() 115 tcph, &tcph->check, datalen, oldlen); in __nf_nat_mangle_tcp_packet() 118 nf_ct_seqadj_set(ct, ctinfo, tcph->seq, in __nf_nat_mangle_tcp_packet()
|
| A D | nf_flow_table_ip.c | 25 struct tcphdr *tcph; in nf_flow_state_check() local 30 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_state_check() 31 if (tcph->syn && test_bit(NF_FLOW_CLOSING, &flow->flags)) { in nf_flow_state_check() 36 if ((tcph->fin || tcph->rst) && in nf_flow_state_check() 46 struct tcphdr *tcph; in nf_flow_nat_ip_tcp() local 48 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_tcp() 49 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, true); in nf_flow_nat_ip_tcp() 484 struct tcphdr *tcph; in nf_flow_nat_ipv6_tcp() local 486 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ipv6_tcp() 487 inet_proto_csum_replace16(&tcph->check, skb, addr->s6_addr32, in nf_flow_nat_ipv6_tcp()
|
| A D | nft_flow_offload.c | 307 struct tcphdr _tcph, *tcph = NULL; in nft_flow_offload_eval() local 324 tcph = skb_header_pointer(pkt->skb, nft_thoff(pkt), in nft_flow_offload_eval() 326 if (unlikely(!tcph || tcph->fin || tcph->rst || in nft_flow_offload_eval() 368 if (tcph) in nft_flow_offload_eval()
|
| A D | nf_conntrack_pptp.c | 497 const struct tcphdr *tcph; in conntrack_pptp_help() local 522 tcph = skb_header_pointer(skb, nexthdr_off, sizeof(_tcph), &_tcph); in conntrack_pptp_help() 523 if (!tcph) in conntrack_pptp_help() 526 nexthdr_off += tcph->doff * 4; in conntrack_pptp_help() 527 datalen = tcplen - tcph->doff * 4; in conntrack_pptp_help()
|
| A D | nf_flow_table_core.c | 603 struct tcphdr *tcph; in nf_flow_nat_port_tcp() local 605 tcph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_tcp() 606 inet_proto_csum_replace2(&tcph->check, skb, port, new_port, false); in nf_flow_nat_port_tcp()
|
| /net/ipv4/netfilter/ |
| A D | ipt_ECN.c | 47 struct tcphdr _tcph, *tcph; in set_ect_tcp() local 52 if (!tcph) in set_ect_tcp() 56 tcph->ece == einfo->proto.tcp.ece) && in set_ect_tcp() 58 tcph->cwr == einfo->proto.tcp.cwr)) in set_ect_tcp() 61 if (skb_ensure_writable(skb, ip_hdrlen(skb) + sizeof(*tcph))) in set_ect_tcp() 63 tcph = (void *)ip_hdr(skb) + ip_hdrlen(skb); in set_ect_tcp() 65 oldval = ((__be16 *)tcph)[6]; in set_ect_tcp() 67 tcph->ece = einfo->proto.tcp.ece; in set_ect_tcp() 69 tcph->cwr = einfo->proto.tcp.cwr; in set_ect_tcp() 71 inet_proto_csum_replace2(&tcph->check, skb, in set_ect_tcp() [all …]
|
| A D | nf_reject_ipv4.c | 197 struct tcphdr *tcph; in nf_reject_ip_tcphdr_put() local 200 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip_tcphdr_put() 201 tcph->source = oth->dest; in nf_reject_ip_tcphdr_put() 202 tcph->dest = oth->source; in nf_reject_ip_tcphdr_put() 203 tcph->doff = sizeof(struct tcphdr) / 4; in nf_reject_ip_tcphdr_put() 206 tcph->seq = oth->ack_seq; in nf_reject_ip_tcphdr_put() 208 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip_tcphdr_put() 211 tcph->ack = 1; in nf_reject_ip_tcphdr_put() 214 tcph->rst = 1; in nf_reject_ip_tcphdr_put() 215 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr, in nf_reject_ip_tcphdr_put() [all …]
|
| /net/netfilter/ipvs/ |
| A D | ip_vs_proto_tcp.c | 112 tcph->check = in tcp_fast_csum_update() 118 tcph->check = in tcp_fast_csum_update() 133 tcph->check = in tcp_partial_csum_update() 139 tcph->check = in tcp_partial_csum_update() 150 struct tcphdr *tcph; in tcp_snat_handler() local 183 tcph->source = cp->vport; in tcp_snat_handler() 199 tcph->check = 0; in tcp_snat_handler() 218 (char*)&(tcph->check) - (char*)tcph); in tcp_snat_handler() 228 struct tcphdr *tcph; in tcp_dnat_handler() local 264 tcph->dest = cp->dport; in tcp_dnat_handler() [all …]
|
| /net/ipv6/netfilter/ |
| A D | nf_reject_ipv6.c | 225 struct tcphdr *tcph; in nf_reject_ip6_tcphdr_put() local 228 tcph = skb_put_zero(nskb, sizeof(struct tcphdr)); in nf_reject_ip6_tcphdr_put() 230 tcph->doff = sizeof(struct tcphdr)/4; in nf_reject_ip6_tcphdr_put() 231 tcph->source = oth->dest; in nf_reject_ip6_tcphdr_put() 232 tcph->dest = oth->source; in nf_reject_ip6_tcphdr_put() 235 tcph->seq = oth->ack_seq; in nf_reject_ip6_tcphdr_put() 237 tcph->ack_seq = htonl(ntohl(oth->seq) + oth->syn + oth->fin + in nf_reject_ip6_tcphdr_put() 239 tcph->ack = 1; in nf_reject_ip6_tcphdr_put() 242 tcph->rst = 1; in nf_reject_ip6_tcphdr_put() 245 tcph->check = csum_ipv6_magic(&ipv6_hdr(nskb)->saddr, in nf_reject_ip6_tcphdr_put() [all …]
|
| /net/sched/ |
| A D | act_csum.c | 209 struct tcphdr *tcph; in tcf_csum_ipv4_tcp() local 215 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv4_tcp() 216 if (tcph == NULL) in tcf_csum_ipv4_tcp() 220 tcph->check = 0; in tcf_csum_ipv4_tcp() 221 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 222 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 233 struct tcphdr *tcph; in tcf_csum_ipv6_tcp() local 239 tcph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*tcph)); in tcf_csum_ipv6_tcp() 240 if (tcph == NULL) in tcf_csum_ipv6_tcp() 244 tcph->check = 0; in tcf_csum_ipv6_tcp() [all …]
|
| A D | act_nat.c | 181 struct tcphdr *tcph; in tcf_nat_act() local 183 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat_act() 184 skb_try_make_writable(skb, ihl + sizeof(*tcph) + noff)) in tcf_nat_act() 187 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() 188 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, in tcf_nat_act()
|
| A D | sch_cake.c | 953 const struct tcphdr *tcph; in cake_get_tcphdr() local 993 if (!tcph || tcph->doff < 5) in cake_get_tcphdr() 1005 const u8 *ptr = (const u8 *)(tcph + 1); in cake_get_tcpopt() 1131 const u8 *ptr = (const u8 *)(tcph + 1); in cake_tcph_may_drop() 1142 if (((tcp_flag_word(tcph) & in cake_tcph_may_drop() 1206 const struct tcphdr *tcph, *tcph_check; in cake_ack_filter() local 1222 if (!tcph) in cake_ack_filter() 1230 if ((tcp_flag_word(tcph) & in cake_ack_filter() 1250 tcph_check->source != tcph->source || in cake_ack_filter() 1251 tcph_check->dest != tcph->dest) in cake_ack_filter() [all …]
|
| A D | act_ct.c | 513 struct tcphdr **tcph) in tcf_ct_flow_table_fill_tuple_ipv4() argument 556 *tcph = (void *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv4() 586 struct tcphdr **tcph) in tcf_ct_flow_table_fill_tuple_ipv6() argument 625 *tcph = (void *)(skb_network_header(skb) + thoff); in tcf_ct_flow_table_fill_tuple_ipv6() 660 struct tcphdr *tcph = NULL; in tcf_ct_flow_table_lookup() local 668 if (!tcf_ct_flow_table_fill_tuple_ipv4(skb, &tuple, &tcph)) in tcf_ct_flow_table_lookup() 672 if (!tcf_ct_flow_table_fill_tuple_ipv6(skb, &tuple, &tcph)) in tcf_ct_flow_table_lookup() 702 if (tcph && (unlikely(tcph->fin || tcph->rst))) { in tcf_ct_flow_table_lookup()
|
| /net/core/ |
| A D | tso.c | 28 struct tcphdr *tcph = (struct tcphdr *)hdr; in tso_build_hdr() local 30 put_unaligned_be32(tso->tcp_seq, &tcph->seq); in tso_build_hdr() 34 tcph->psh = 0; in tso_build_hdr() 35 tcph->fin = 0; in tso_build_hdr() 36 tcph->rst = 0; in tso_build_hdr()
|
| /net/ipv4/ |
| A D | route.c | 3189 struct tcphdr *tcph; in inet_rtm_getroute_build_skb() local 3191 tcph = skb_put_zero(skb, sizeof(struct tcphdr)); in inet_rtm_getroute_build_skb() 3192 tcph->source = sport; in inet_rtm_getroute_build_skb() 3193 tcph->dest = dport; in inet_rtm_getroute_build_skb() 3194 tcph->doff = sizeof(struct tcphdr) / 4; in inet_rtm_getroute_build_skb() 3195 tcph->rst = 1; in inet_rtm_getroute_build_skb() 3196 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), in inet_rtm_getroute_build_skb()
|