/net/netfilter/ |
D | utils.c | 14 __sum16 csum = 0; in nf_ip_checksum() local 21 !csum_fold(skb->csum)) || in nf_ip_checksum() 24 skb->csum)) { in nf_ip_checksum() 31 skb->csum = 0; in nf_ip_checksum() 33 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, in nf_ip_checksum() 36 csum = __skb_checksum_complete(skb); in nf_ip_checksum() 38 return csum; in nf_ip_checksum() 48 __sum16 csum = 0; in nf_ip_checksum_partial() local 56 skb->csum = csum_tcpudp_nofold(iph->saddr, iph->daddr, protocol, in nf_ip_checksum_partial() 61 return csum; in nf_ip_checksum_partial() [all …]
|
D | xt_TCPMSS.c | 242 skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)oldlen), in tcpmss_tg6()
|
/net/sched/ |
D | act_csum.c | 156 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp() 157 icmph->checksum = csum_fold(skb->csum); in tcf_csum_ipv4_icmp() 173 igmph->csum = 0; in tcf_csum_ipv4_igmp() 174 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp() 175 igmph->csum = csum_fold(skb->csum); in tcf_csum_ipv4_igmp() 194 skb->csum = csum_partial(icmp6h, ipl - ihl, 0); in tcf_csum_ipv6_icmp() 197 skb->csum); in tcf_csum_ipv6_icmp() 219 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv4_tcp() 221 iph->saddr, iph->daddr, skb->csum); in tcf_csum_ipv4_tcp() 243 skb->csum = csum_partial(tcph, ipl - ihl, 0); in tcf_csum_ipv6_tcp() [all …]
|
/net/sunrpc/ |
D | socklib.c | 31 __wsum csum; member 75 desc->csum = csum_block_add(desc->csum, csum2, pos); in xdr_skb_read_and_csum_bits() 181 desc.csum = csum_partial(skb->data, desc.offset, skb->csum); in csum_partial_copy_to_xdr() 187 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); in csum_partial_copy_to_xdr() 191 if (csum_fold(desc.csum)) in csum_partial_copy_to_xdr()
|
/net/ipv4/ |
D | ip_output.c | 939 __wsum csum = 0; in ip_generic_getfrag() local 940 if (!csum_and_copy_from_iter_full(to, len, &csum, &msg->msg_iter)) in ip_generic_getfrag() 942 skb->csum = csum_block_add(skb->csum, csum, odd); in ip_generic_getfrag() 952 __wsum csum; in csum_page() local 954 csum = csum_partial(kaddr + offset, copy, 0); in csum_page() 956 return csum; in csum_page() 1138 skb->csum = 0; in __ip_append_data() 1151 skb->csum = skb_copy_and_csum_bits( in __ip_append_data() 1154 skb_prev->csum = csum_sub(skb_prev->csum, in __ip_append_data() 1155 skb->csum); in __ip_append_data() [all …]
|
D | icmp.c | 348 __wsum csum; in icmp_glue_bits() local 350 csum = skb_copy_and_csum_bits(icmp_param->skb, in icmp_glue_bits() 354 skb->csum = csum_block_add(skb->csum, csum, odd); in icmp_glue_bits() 375 __wsum csum; in icmp_push_reply() local 378 csum = csum_partial_copy_nocheck((void *)&icmp_param->data, in icmp_push_reply() 382 csum = csum_add(csum, skb1->csum); in icmp_push_reply() 384 icmph->checksum = csum_fold(csum); in icmp_push_reply()
|
D | inet_fragment.c | 497 clone->csum = 0; in inet_frag_reasm_prepare() 540 head->csum = csum_add(head->csum, fp->csum); in inet_frag_reasm_finish()
|
D | udp.c | 845 __wsum csum = 0; in udp4_hwcsum() local 864 csum = csum_add(csum, frags->csum); in udp4_hwcsum() 868 csum = skb_checksum(skb, offset, hlen, csum); in udp4_hwcsum() 871 uh->check = csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, csum); in udp4_hwcsum() 915 __wsum csum = 0; in udp_send_skb() local 958 csum = udplite_csum(skb); in udp_send_skb() 972 csum = udp_csum(skb); in udp_send_skb() 976 sk->sk_protocol, csum); in udp_send_skb() 2323 skb->csum = inet_compute_pseudo(skb, proto); in udp4_csum_init()
|
/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 193 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_snat_handler() 199 cp->protocol, skb->csum); in udp_snat_handler() 206 skb->csum); in udp_snat_handler() 277 skb->csum = skb_checksum(skb, udphoff, skb->len - udphoff, 0); in udp_dnat_handler() 283 cp->protocol, skb->csum); in udp_dnat_handler() 290 skb->csum); in udp_dnat_handler() 319 skb->csum = skb_checksum(skb, udphoff, in udp_csum_check() 329 skb->csum)) { in udp_csum_check() 340 skb->csum)) { in udp_csum_check()
|
D | ip_vs_proto_tcp.c | 200 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_snat_handler() 206 cp->protocol, skb->csum); in tcp_snat_handler() 213 skb->csum); in tcp_snat_handler() 283 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_dnat_handler() 289 cp->protocol, skb->csum); in tcp_dnat_handler() 296 skb->csum); in tcp_dnat_handler() 317 skb->csum = skb_checksum(skb, tcphoff, skb->len - tcphoff, 0); in tcp_csum_check() 326 skb->csum)) { in tcp_csum_check() 337 skb->csum)) { in tcp_csum_check()
|
/net/core/ |
D | skbuff.c | 949 skb->csum, skb->ip_summed, skb->csum_complete_sw, in skb_dump() 1140 CHECK_SKB_FIELD(csum); in __copy_skb_header() 2336 skb->csum = csum_block_sub(skb->csum, in pskb_trim_rcsum_slow() 2998 __wsum csum, const struct skb_checksum_ops *ops) in __skb_checksum() argument 3009 csum = INDIRECT_CALL_1(ops->update, csum_partial_ext, in __skb_checksum() 3010 skb->data + offset, copy, csum); in __skb_checksum() 3012 return csum; in __skb_checksum() 3041 csum = INDIRECT_CALL_1(ops->combine, in __skb_checksum() 3042 csum_block_add_ext, csum, in __skb_checksum() 3048 return csum; in __skb_checksum() [all …]
|
D | datagram.c | 724 struct csum_state csdata = { .csum = *csump }; in skb_copy_and_csum_datagram() 732 *csump = csdata.csum; in skb_copy_and_csum_datagram() 751 __wsum csum; in skb_copy_and_csum_datagram_msg() local 763 csum = csum_partial(skb->data, hlen, skb->csum); in skb_copy_and_csum_datagram_msg() 765 chunk, &csum)) in skb_copy_and_csum_datagram_msg() 768 if (csum_fold(csum)) { in skb_copy_and_csum_datagram_msg()
|
D | utils.c | 431 skb->csum = ~csum_add(csum_sub(~(skb->csum), in inet_proto_csum_replace4() 481 skb->csum = ~csum_sub(diff, skb->csum); in inet_proto_csum_replace_by_diff()
|
D | gro.c | 528 NAPI_GRO_CB(skb)->csum = skb->csum; in dev_gro_receive() 802 sum = csum_fold(csum_add(NAPI_GRO_CB(skb)->csum, wsum)); in __skb_gro_checksum_complete() 810 NAPI_GRO_CB(skb)->csum = wsum; in __skb_gro_checksum_complete()
|
/net/ipv6/ |
D | raw.c | 398 skb->len, inet->inet_num, skb->csum)) in rawv6_rcv() 402 skb->csum = ~csum_unfold(csum_ipv6_magic(&ipv6_hdr(skb)->saddr, in rawv6_rcv() 512 __sum16 csum; in rawv6_push_pending_frames() local 537 tmp_csum = skb->csum; in rawv6_push_pending_frames() 543 tmp_csum = csum_add(tmp_csum, skb->csum); in rawv6_push_pending_frames() 561 err = skb_copy_bits(skb, offset, &csum, 2); in rawv6_push_pending_frames() 568 if (unlikely(csum)) in rawv6_push_pending_frames() 569 tmp_csum = csum_sub(tmp_csum, csum_unfold(csum)); in rawv6_push_pending_frames() 571 csum = csum_ipv6_magic(&fl6->saddr, &fl6->daddr, in rawv6_push_pending_frames() 574 if (csum == 0 && fl6->flowi6_proto == IPPROTO_UDP) in rawv6_push_pending_frames() [all …]
|
D | ip6_checksum.c | 10 __u32 len, __u8 proto, __wsum csum) in csum_ipv6_magic() argument 16 __u32 sum = (__force u32)csum; in csum_ipv6_magic() 78 skb->csum = ip6_compute_pseudo(skb, proto); in udp6_csum_init()
|
D | udp_offload.c | 28 __wsum csum; in udp6_ufo_fragment() local 60 csum = skb_checksum(skb, 0, skb->len, 0); in udp6_ufo_fragment() 62 &ipv6h->daddr, csum); in udp6_ufo_fragment()
|
D | icmp.c | 283 skb->csum = csum_partial(icmp6h, in icmpv6_push_pending_frames() 284 sizeof(struct icmp6hdr), skb->csum); in icmpv6_push_pending_frames() 288 skb->csum); in icmpv6_push_pending_frames() 293 tmp_csum = csum_add(tmp_csum, skb->csum); in icmpv6_push_pending_frames() 316 __wsum csum; in icmpv6_getfrag() local 318 csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset, in icmpv6_getfrag() 320 skb->csum = csum_block_add(skb->csum, csum, odd); in icmpv6_getfrag()
|
D | udp.c | 1196 __wsum csum = 0; in udp6_hwcsum_outgoing() local 1210 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0); in udp6_hwcsum_outgoing() 1211 csum = skb->csum; in udp6_hwcsum_outgoing() 1216 csum = csum_add(csum, frags->csum); in udp6_hwcsum_outgoing() 1220 csum); in udp6_hwcsum_outgoing() 1237 __wsum csum = 0; in udp_v6_send_skb() local 1283 csum = udplite_csum(skb); in udp_v6_send_skb() 1292 csum = udp_csum(skb); in udp_v6_send_skb() 1296 len, fl6->flowi6_proto, csum); in udp_v6_send_skb()
|
/net/mptcp/ |
D | options.c | 111 mp_opt->csum = get_unaligned((__force __sum16 *)ptr); in mptcp_parse_option() 117 mp_opt->rcvr_key, mp_opt->data_len, mp_opt->csum); in mptcp_parse_option() 225 mp_opt->csum = get_unaligned((__force __sum16 *)ptr); in mptcp_parse_option() 232 mp_opt->csum); in mptcp_parse_option() 491 opts->csum = mpext->csum; in mptcp_established_options_mp() 1222 mpext->csum = mp_opt.csum; in mptcp_incoming_options() 1290 __wsum csum; in __mptcp_make_csum() local 1300 header.csum = 0; in __mptcp_make_csum() 1302 csum = csum_partial(&header, sizeof(header), sum); in __mptcp_make_csum() 1303 return csum_fold(csum); in __mptcp_make_csum() [all …]
|
/net/ipv6/netfilter/ |
D | nf_conntrack_reasm.c | 194 skb->csum = csum_sub(skb->csum, in nf_ct_frag6_queue() 359 skb->csum = csum_partial(skb_network_header(skb), in nf_ct_frag6_reasm() 361 skb->csum); in nf_ct_frag6_reasm()
|
/net/ipv4/netfilter/ |
D | nf_reject_ipv4.c | 84 __wsum csum; in nf_reject_skb_v4_unreach() local 129 csum = csum_partial((void *)icmph, len + sizeof(struct icmphdr), 0); in nf_reject_skb_v4_unreach() 130 icmph->checksum = csum_fold(csum); in nf_reject_skb_v4_unreach()
|
/net/dsa/ |
D | tag_dsa.c | 308 __wsum c = skb->csum; in dsa_rcv_ll() 311 skb->csum = c; in dsa_rcv_ll()
|
/net/can/ |
D | gw.c | 105 } csum; member 550 (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8); in can_can_gw_rcv() 553 (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor); in can_can_gw_rcv() 722 &gwj->mod.csum.crc8) < 0) in cgw_put_job() 728 &gwj->mod.csum.xor) < 0) in cgw_put_job() 980 nla_memcpy(&mod->csum.crc8, tb[CGW_CS_CRC8], in cgw_parse_attr() 1003 nla_memcpy(&mod->csum.xor, tb[CGW_CS_XOR], in cgw_parse_attr()
|
/net/rxrpc/ |
D | rxkad.c | 851 u32 csum = 1000003; in rxkad_calc_response_checksum() local 856 csum = csum * 0x10204081 + *p++; in rxkad_calc_response_checksum() 858 response->encrypted.checksum = htonl(csum); in rxkad_calc_response_checksum() 1170 __be32 csum; in rxkad_verify_response() local 1256 csum = response->encrypted.checksum; in rxkad_verify_response() 1260 if (response->encrypted.checksum != csum) in rxkad_verify_response()
|