/net/ipv4/ |
D | udp_offload.c | 44 partial = csum_sub(csum_unfold(uh->check), partial); in __skb_udp_tunnel_segment() 131 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment() 135 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment() 136 if (uh->check == 0) in __skb_udp_tunnel_segment() 137 uh->check = CSUM_MANGLED_0; in __skb_udp_tunnel_segment() 141 skb->csum_offset = offsetof(struct udphdr, check); in __skb_udp_tunnel_segment() 196 __sum16 check; in __udp_gso_segment() local 234 check = csum16_add(csum16_sub(uh->check, uh->len), newlen); in __udp_gso_segment() 247 uh->check = check; in __udp_gso_segment() 250 gso_reset_checksum(seg, ~check); in __udp_gso_segment() [all …]
|
D | tcp_offload.c | 46 th->check = 0; in tcp4_gso_segment() 121 newcheck = ~csum_fold((__force __wsum)((__force u32)th->check + in tcp_gso_segment() 126 th->check = newcheck; in tcp_gso_segment() 129 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment() 131 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment() 170 th->check = ~csum_fold((__force __wsum)((__force u32)th->check + in tcp_gso_segment() 173 gso_reset_checksum(skb, ~th->check); in tcp_gso_segment() 175 th->check = gso_make_checksum(skb, ~th->check); in tcp_gso_segment() 293 skb->csum_offset = offsetof(struct tcphdr, check); in tcp_gro_complete() 324 th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr, in tcp4_gro_complete()
|
/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 100 uhdr->check = in udp_fast_csum_update() 103 ~csum_unfold(uhdr->check)))); in udp_fast_csum_update() 106 uhdr->check = in udp_fast_csum_update() 109 ~csum_unfold(uhdr->check)))); in udp_fast_csum_update() 110 if (!uhdr->check) in udp_fast_csum_update() 111 uhdr->check = CSUM_MANGLED_0; in udp_fast_csum_update() 122 uhdr->check = in udp_partial_csum_update() 125 csum_unfold(uhdr->check)))); in udp_partial_csum_update() 128 uhdr->check = in udp_partial_csum_update() 131 csum_unfold(uhdr->check)))); in udp_partial_csum_update() [all …]
|
D | ip_vs_proto_tcp.c | 112 tcph->check = in tcp_fast_csum_update() 115 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 118 tcph->check = in tcp_fast_csum_update() 121 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 133 tcph->check = in tcp_partial_csum_update() 136 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 139 tcph->check = in tcp_partial_csum_update() 142 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 199 tcph->check = 0; in tcp_snat_handler() 203 tcph->check = csum_ipv6_magic(&cp->vaddr.in6, in tcp_snat_handler() [all …]
|
/net/ipv6/ |
D | ip6_checksum.c | 91 err = (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, in udp6_csum_init() 122 uh->check = 0; in udp6_set_csum() 124 uh->check = ~udp_v6_check(len, saddr, daddr, 0); in udp6_set_csum() 126 uh->check = 0; in udp6_set_csum() 127 uh->check = udp_v6_check(len, saddr, daddr, lco_csum(skb)); in udp6_set_csum() 128 if (uh->check == 0) in udp6_set_csum() 129 uh->check = CSUM_MANGLED_0; in udp6_set_csum() 133 skb->csum_offset = offsetof(struct udphdr, check); in udp6_set_csum() 134 uh->check = ~udp_v6_check(len, saddr, daddr, 0); in udp6_set_csum()
|
D | udp_offload.c | 58 uh->check = 0; in udp6_ufo_fragment() 60 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment() 62 if (uh->check == 0) in udp6_ufo_fragment() 63 uh->check = CSUM_MANGLED_0; in udp6_ufo_fragment() 126 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, in udp6_gro_receive() 129 else if (uh->check) in udp6_gro_receive() 130 skb_gro_checksum_try_convert(skb, IPPROTO_UDP, uh->check, in udp6_gro_receive() 147 if (uh->check) in udp6_gro_complete() 148 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete()
|
/net/netfilter/ |
D | nf_nat_proto.c | 34 unsigned int iphdroff, __sum16 *check, 56 nf_csum_update(skb, iphdroff, &hdr->check, tuple, maniptype); in __udp_manip_pkt() 57 inet_proto_csum_replace2(&hdr->check, skb, *portptr, newport, in __udp_manip_pkt() 59 if (!hdr->check) in __udp_manip_pkt() 60 hdr->check = CSUM_MANGLED_0; in __udp_manip_pkt() 77 do_csum = hdr->check || skb->ip_summed == CHECKSUM_PARTIAL; in udp_manip_pkt() 179 nf_csum_update(skb, iphdroff, &hdr->check, tuple, maniptype); in tcp_manip_pkt() 180 inet_proto_csum_replace2(&hdr->check, skb, oldport, newport, false); in tcp_manip_pkt() 374 csum_replace4(&iph->check, iph->saddr, target->src.u3.ip); in nf_nat_ipv4_manip_pkt() 377 csum_replace4(&iph->check, iph->daddr, target->dst.u3.ip); in nf_nat_ipv4_manip_pkt() [all …]
|
D | nf_flow_table_ip.c | 49 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, true); in nf_flow_nat_ip_tcp() 64 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in nf_flow_nat_ip_udp() 65 inet_proto_csum_replace4(&udph->check, skb, addr, in nf_flow_nat_ip_udp() 67 if (!udph->check) in nf_flow_nat_ip_udp() 68 udph->check = CSUM_MANGLED_0; in nf_flow_nat_ip_udp() 112 csum_replace4(&iph->check, addr, new_addr); in nf_flow_snat_ip() 137 csum_replace4(&iph->check, addr, new_addr); in nf_flow_dnat_ip() 315 inet_proto_csum_replace16(&tcph->check, skb, addr->s6_addr32, in nf_flow_nat_ipv6_tcp() 332 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in nf_flow_nat_ipv6_udp() 333 inet_proto_csum_replace16(&udph->check, skb, addr->s6_addr32, in nf_flow_nat_ipv6_udp() [all …]
|
D | xt_TCPMSS.c | 133 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 179 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 186 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), false); in tcpmss_mangle_packet() 190 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 211 csum_replace2(&iph->check, iph->tot_len, newlen); in tcpmss_tg4()
|
D | nf_synproxy_core.c | 224 inet_proto_csum_replace4(&th->check, skb, in synproxy_tstamp_adjust() 428 iph->check = 0; in synproxy_build_ip() 442 nth->check = ~tcp_v4_check(tcp_hdr_size, niph->saddr, niph->daddr, 0); in synproxy_send_tcp() 445 nskb->csum_offset = offsetof(struct tcphdr, check); in synproxy_send_tcp() 497 nth->check = 0; in synproxy_send_client_synack() 543 nth->check = 0; in synproxy_send_server_syn() 583 nth->check = 0; in synproxy_send_server_ack() 621 nth->check = 0; in synproxy_send_client_ack() 841 nth->check = ~tcp_v6_check(tcp_hdr_size, &niph->saddr, &niph->daddr, 0); in synproxy_send_tcp_ipv6() 844 nskb->csum_offset = offsetof(struct tcphdr, check); in synproxy_send_tcp_ipv6() [all …]
|
D | xt_multiport.c | 109 check(u_int16_t proto, in check() function 130 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt_check() 139 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt6_check()
|
D | nf_conntrack_seqadj.c | 106 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 108 inet_proto_csum_replace4(&tcph->check, skb, in nf_ct_sack_block_adjust() 190 inet_proto_csum_replace4(&tcph->check, skb, tcph->seq, newseq, false); in nf_ct_seq_adjust() 205 inet_proto_csum_replace4(&tcph->check, skb, tcph->ack_seq, newack, in nf_ct_seq_adjust()
|
D | nf_nat_helper.c | 115 tcph, &tcph->check, datalen, oldlen); in __nf_nat_mangle_tcp_packet() 167 if (!udph->check && skb->ip_summed != CHECKSUM_PARTIAL) in nf_nat_mangle_udp_packet() 171 udph, &udph->check, datalen, oldlen); in nf_nat_mangle_udp_packet()
|
/net/ipv4/netfilter/ |
D | nf_nat_snmp_basic_main.c | 62 __sum16 *check; member 91 *ctx->check = csum_fold(csum_partial(s, size, in fast_csum() 92 ~csum_unfold(*ctx->check))); in fast_csum() 118 if (*ctx->check) in snmp_helper() 147 ctx.check = &udph->check; in snmp_translate()
|
D | nf_reject_ipv4.c | 58 niph->check = 0; in nf_reject_iphdr_put() 91 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr, in nf_reject_ip_tcphdr_put() 95 nskb->csum_offset = offsetof(struct tcphdr, check); in nf_reject_ip_tcphdr_put()
|
/net/ipv6/ila/ |
D | ila_common.c | 88 inet_proto_csum_replace_by_diff(&th->check, skb, in ila_csum_adjust_transport() 97 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in ila_csum_adjust_transport() 99 inet_proto_csum_replace_by_diff(&uh->check, skb, in ila_csum_adjust_transport() 101 if (!uh->check) in ila_csum_adjust_transport() 102 uh->check = CSUM_MANGLED_0; in ila_csum_adjust_transport()
|
/net/sched/ |
D | act_csum.c | 221 tcph->check = 0; in tcf_csum_ipv4_tcp() 223 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 245 tcph->check = 0; in tcf_csum_ipv6_tcp() 247 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp() 280 if (udplite || udph->check) { in tcf_csum_ipv4_udp() 282 udph->check = 0; in tcf_csum_ipv4_udp() 298 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp() 302 if (!udph->check) in tcf_csum_ipv4_udp() 303 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp() 336 udph->check = 0; in tcf_csum_ipv6_udp() [all …]
|
D | act_nat.c | 160 csum_replace4(&iph->check, addr, new_addr); in tcf_nat_act() 179 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, in tcf_nat_act() 192 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in tcf_nat_act() 193 inet_proto_csum_replace4(&udph->check, skb, addr, in tcf_nat_act() 195 if (!udph->check) in tcf_nat_act() 196 udph->check = CSUM_MANGLED_0; in tcf_nat_act()
|
/net/openvswitch/ |
D | actions.c | 355 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb, in update_ip_l4_checksum() 361 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ip_l4_checksum() 362 inet_proto_csum_replace4(&uh->check, skb, in update_ip_l4_checksum() 364 if (!uh->check) in update_ip_l4_checksum() 365 uh->check = CSUM_MANGLED_0; in update_ip_l4_checksum() 375 csum_replace4(&nh->check, *addr, new_addr); in set_ip_addr() 387 inet_proto_csum_replace16(&tcp_hdr(skb)->check, skb, in update_ipv6_checksum() 393 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum() 394 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum() 396 if (!uh->check) in update_ipv6_checksum() [all …]
|
/net/rxrpc/ |
D | rxkad.c | 188 u16 check; in rxkad_secure_packet_auth() local 192 check = sp->hdr.seq ^ call->call_id; in rxkad_secure_packet_auth() 193 data_size |= (u32)check << 16; in rxkad_secure_packet_auth() 227 u16 check; in rxkad_secure_packet_encrypt() local 234 check = sp->hdr.seq ^ call->call_id; in rxkad_secure_packet_encrypt() 236 rxkhdr.data_size = htonl(data_size | (u32)check << 16); in rxkad_secure_packet_encrypt() 361 u16 check; in rxkad_verify_packet_1() local 401 check = buf >> 16; in rxkad_verify_packet_1() 402 check ^= seq ^ call->call_id; in rxkad_verify_packet_1() 403 check &= 0xffff; in rxkad_verify_packet_1() [all …]
|
/net/core/ |
D | netpoll.c | 398 udph->check = 0; in netpoll_send_udp() 399 udph->check = csum_ipv6_magic(&np->local_ip.in6, in netpoll_send_udp() 403 if (udph->check == 0) in netpoll_send_udp() 404 udph->check = CSUM_MANGLED_0; in netpoll_send_udp() 426 udph->check = 0; in netpoll_send_udp() 427 udph->check = csum_tcpudp_magic(np->local_ip.ip, in netpoll_send_udp() 431 if (udph->check == 0) in netpoll_send_udp() 432 udph->check = CSUM_MANGLED_0; in netpoll_send_udp() 446 iph->check = 0; in netpoll_send_udp() 449 iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); in netpoll_send_udp()
|
/net/6lowpan/ |
D | nhc_udp.c | 79 fail |= lowpan_fetch_skb(skb, &uh.check, sizeof(uh.check)); in udp_uncompress() 167 lowpan_push_hc_data(hc_ptr, &uh->check, sizeof(uh->check)); in udp_compress()
|
/net/bridge/netfilter/ |
D | ebtable_nat.c | 46 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 57 .check = check,
|
D | ebtable_filter.c | 46 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 57 .check = check,
|
D | ebtable_broute.c | 39 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 50 .check = check,
|