/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 91 uhdr->check = in udp_fast_csum_update() 94 ~csum_unfold(uhdr->check)))); in udp_fast_csum_update() 97 uhdr->check = in udp_fast_csum_update() 100 ~csum_unfold(uhdr->check)))); in udp_fast_csum_update() 101 if (!uhdr->check) in udp_fast_csum_update() 102 uhdr->check = CSUM_MANGLED_0; in udp_fast_csum_update() 113 uhdr->check = in udp_partial_csum_update() 116 csum_unfold(uhdr->check)))); in udp_partial_csum_update() 119 uhdr->check = in udp_partial_csum_update() 122 csum_unfold(uhdr->check)))); in udp_partial_csum_update() [all …]
|
D | ip_vs_proto_tcp.c | 94 tcph->check = in tcp_fast_csum_update() 97 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 100 tcph->check = in tcp_fast_csum_update() 103 ~csum_unfold(tcph->check)))); in tcp_fast_csum_update() 115 tcph->check = in tcp_partial_csum_update() 118 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 121 tcph->check = in tcp_partial_csum_update() 124 csum_unfold(tcph->check)))); in tcp_partial_csum_update() 181 tcph->check = 0; in tcp_snat_handler() 185 tcph->check = csum_ipv6_magic(&cp->vaddr.in6, in tcp_snat_handler() [all …]
|
/net/openvswitch/ |
D | actions.c | 146 inet_proto_csum_replace4(&tcp_hdr(skb)->check, skb, in set_ip_addr() 152 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in set_ip_addr() 153 inet_proto_csum_replace4(&uh->check, skb, in set_ip_addr() 155 if (!uh->check) in set_ip_addr() 156 uh->check = CSUM_MANGLED_0; in set_ip_addr() 161 csum_replace4(&nh->check, *addr, new_addr); in set_ip_addr() 173 inet_proto_csum_replace16(&tcp_hdr(skb)->check, skb, in update_ipv6_checksum() 179 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum() 180 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum() 182 if (!uh->check) in update_ipv6_checksum() [all …]
|
/net/ipv4/netfilter/ |
D | nf_nat_l3proto_ipv4.c | 99 csum_replace4(&iph->check, iph->saddr, target->src.u3.ip); in nf_nat_ipv4_manip_pkt() 102 csum_replace4(&iph->check, iph->daddr, target->dst.u3.ip); in nf_nat_ipv4_manip_pkt() 109 unsigned int iphdroff, __sum16 *check, in nf_nat_ipv4_csum_update() argument 123 inet_proto_csum_replace4(check, skb, oldip, newip, 1); in nf_nat_ipv4_csum_update() 127 u8 proto, void *data, __sum16 *check, in nf_nat_ipv4_csum_recalc() argument 140 skb->csum_offset = (void *)check - data; in nf_nat_ipv4_csum_recalc() 141 *check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, in nf_nat_ipv4_csum_recalc() 144 *check = 0; in nf_nat_ipv4_csum_recalc() 145 *check = csum_tcpudp_magic(iph->saddr, iph->daddr, in nf_nat_ipv4_csum_recalc() 149 if (proto == IPPROTO_UDP && !*check) in nf_nat_ipv4_csum_recalc() [all …]
|
D | nf_nat_snmp_basic.c | 625 __sum16 *check); 901 __sum16 *check) in mangle_address() argument 912 if (*check) { in mangle_address() 913 fast_csum(check, in mangle_address() 927 __sum16 *check) in snmp_trap_decode() argument 955 mangle_address(ctx->begin, ctx->pointer - 4, map, check); in snmp_trap_decode() 1021 __sum16 *check) in snmp_parse_mangle() argument 1108 unsigned char ret = snmp_trap_decode(&ctx, &trap, map, check); in snmp_parse_mangle() 1160 mangle_address(ctx.begin, ctx.pointer - 4 , map, check); in snmp_parse_mangle() 1210 paylen, &map, &udph->check)) { in snmp_translate()
|
D | ipt_REJECT.c | 80 niph->check = 0; in send_reset() 101 tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr, in send_reset() 105 nskb->csum_offset = offsetof(struct tcphdr, check); in send_reset()
|
D | ipt_ECN.c | 41 csum_replace2(&iph->check, htons(oldtos), htons(iph->tos)); in set_ect_ip() 74 inet_proto_csum_replace2(&tcph->check, skb, in set_ect_tcp()
|
/net/netfilter/ |
D | nf_nat_proto_udp.c | 56 if (hdr->check || skb->ip_summed == CHECKSUM_PARTIAL) { in udp_manip_pkt() 57 l3proto->csum_update(skb, iphdroff, &hdr->check, in udp_manip_pkt() 59 inet_proto_csum_replace2(&hdr->check, skb, *portptr, newport, in udp_manip_pkt() 61 if (!hdr->check) in udp_manip_pkt() 62 hdr->check = CSUM_MANGLED_0; in udp_manip_pkt()
|
D | nf_nat_proto_udplite.c | 58 l3proto->csum_update(skb, iphdroff, &hdr->check, tuple, maniptype); in udplite_manip_pkt() 59 inet_proto_csum_replace2(&hdr->check, skb, *portptr, newport, 0); in udplite_manip_pkt() 60 if (!hdr->check) in udplite_manip_pkt() 61 hdr->check = CSUM_MANGLED_0; in udplite_manip_pkt()
|
D | nf_nat_helper.c | 209 l3proto->csum_recalc(skb, IPPROTO_TCP, tcph, &tcph->check, in __nf_nat_mangle_tcp_packet() 263 if (!udph->check && skb->ip_summed != CHECKSUM_PARTIAL) in nf_nat_mangle_udp_packet() 267 l3proto->csum_recalc(skb, IPPROTO_UDP, udph, &udph->check, in nf_nat_mangle_udp_packet() 307 inet_proto_csum_replace4(&tcph->check, skb, in sack_adjust() 309 inet_proto_csum_replace4(&tcph->check, skb, in sack_adjust() 400 inet_proto_csum_replace4(&tcph->check, skb, tcph->seq, newseq, 0); in nf_nat_seq_adjust() 401 inet_proto_csum_replace4(&tcph->check, skb, tcph->ack_seq, newack, 0); in nf_nat_seq_adjust()
|
D | xt_TCPMSS.c | 107 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 148 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 155 inet_proto_csum_replace4(&tcph->check, skb, 0, *((__be32 *)opt), 0); in tcpmss_mangle_packet() 159 inet_proto_csum_replace2(&tcph->check, skb, in tcpmss_mangle_packet() 211 csum_replace2(&iph->check, iph->tot_len, newlen); in tcpmss_tg4()
|
D | xt_multiport.c | 98 check(u_int16_t proto, in check() function 119 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt_check() 128 return check(ip->proto, ip->invflags, multiinfo->flags, in multiport_mt6_check()
|
D | nf_nat_proto_tcp.c | 72 l3proto->csum_update(skb, iphdroff, &hdr->check, tuple, maniptype); in tcp_manip_pkt() 73 inet_proto_csum_replace2(&hdr->check, skb, oldport, newport, 0); in tcp_manip_pkt()
|
/net/ipv6/netfilter/ |
D | nf_nat_l3proto_ipv6.c | 112 unsigned int iphdroff, __sum16 *check, in nf_nat_ipv6_csum_update() argument 126 inet_proto_csum_replace16(check, skb, oldip->s6_addr32, in nf_nat_ipv6_csum_update() 131 u8 proto, void *data, __sum16 *check, in nf_nat_ipv6_csum_recalc() argument 144 skb->csum_offset = (void *)check - data; in nf_nat_ipv6_csum_recalc() 145 *check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in nf_nat_ipv6_csum_recalc() 148 *check = 0; in nf_nat_ipv6_csum_recalc() 149 *check = csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in nf_nat_ipv6_csum_recalc() 153 if (proto == IPPROTO_UDP && !*check) in nf_nat_ipv6_csum_recalc() 154 *check = CSUM_MANGLED_0; in nf_nat_ipv6_csum_recalc() 157 inet_proto_csum_replace2(check, skb, in nf_nat_ipv6_csum_recalc()
|
/net/sched/ |
D | act_csum.c | 202 tcph->check = 0; in tcf_csum_ipv4_tcp() 204 tcph->check = tcp_v4_check(ipl - ihl, in tcf_csum_ipv4_tcp() 223 tcph->check = 0; in tcf_csum_ipv6_tcp() 225 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp() 255 if (udplite || udph->check) { in tcf_csum_ipv4_udp() 257 udph->check = 0; in tcf_csum_ipv4_udp() 273 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp() 277 if (!udph->check) in tcf_csum_ipv4_udp() 278 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp() 308 udph->check = 0; in tcf_csum_ipv6_udp() [all …]
|
D | act_nat.c | 162 csum_replace4(&iph->check, addr, new_addr); in tcf_nat() 183 inet_proto_csum_replace4(&tcph->check, skb, addr, new_addr, 1); in tcf_nat() 197 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in tcf_nat() 198 inet_proto_csum_replace4(&udph->check, skb, addr, in tcf_nat() 200 if (!udph->check) in tcf_nat() 201 udph->check = CSUM_MANGLED_0; in tcf_nat()
|
/net/bridge/netfilter/ |
D | ebtable_broute.c | 37 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 49 .check = check,
|
D | ebtable_nat.c | 46 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 58 .check = check,
|
D | ebtable_filter.c | 46 static int check(const struct ebt_table_info *info, unsigned int valid_hooks) in check() function 58 .check = check,
|
/net/rxrpc/ |
D | rxkad.c | 166 u16 check; in rxkad_secure_packet_auth() local 172 check = ntohl(sp->hdr.seq ^ sp->hdr.callNumber); in rxkad_secure_packet_auth() 173 data_size |= (u32) check << 16; in rxkad_secure_packet_auth() 211 u16 check; in rxkad_secure_packet_encrypt() local 218 check = ntohl(sp->hdr.seq ^ sp->hdr.callNumber); in rxkad_secure_packet_encrypt() 220 rxkhdr.data_size = htonl(data_size | (u32) check << 16); in rxkad_secure_packet_encrypt() 338 u16 check; in rxkad_verify_packet_auth() local 370 check = buf >> 16; in rxkad_verify_packet_auth() 371 check ^= ntohl(sp->hdr.seq ^ sp->hdr.callNumber); in rxkad_verify_packet_auth() 372 check &= 0xffff; in rxkad_verify_packet_auth() [all …]
|
/net/ipv6/ |
D | tcpv6_offload.c | 29 th->check = 0; in tcp_v6_gso_send_check() 76 th->check = ~tcp_v6_check(skb->len - skb_transport_offset(skb), in tcp6_gro_complete()
|
D | udp_offload.c | 34 uh->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, skb->len, in udp6_ufo_send_check() 37 skb->csum_offset = offsetof(struct udphdr, check); in udp6_ufo_send_check()
|
/net/core/ |
D | netpoll.c | 116 if (uh->check == 0 || skb_csum_unnecessary(skb)) in checksum_udp() 458 udph->check = 0; in netpoll_send_udp() 459 udph->check = csum_ipv6_magic(&np->local_ip.in6, in netpoll_send_udp() 463 if (udph->check == 0) in netpoll_send_udp() 464 udph->check = CSUM_MANGLED_0; in netpoll_send_udp() 486 udph->check = 0; in netpoll_send_udp() 487 udph->check = csum_tcpudp_magic(np->local_ip.ip, in netpoll_send_udp() 491 if (udph->check == 0) in netpoll_send_udp() 492 udph->check = CSUM_MANGLED_0; in netpoll_send_udp() 506 iph->check = 0; in netpoll_send_udp() [all …]
|
/net/l2tp/ |
D | l2tp_core.c | 511 if (!uh->check) { in l2tp_verify_udp_checksum() 530 if (!uh->check) in l2tp_verify_udp_checksum() 1122 uh->check = csum_ipv6_magic(&np->saddr, &np->daddr, udp_len, in l2tp_xmit_ipv6_csum() 1124 if (uh->check == 0) in l2tp_xmit_ipv6_csum() 1125 uh->check = CSUM_MANGLED_0; in l2tp_xmit_ipv6_csum() 1129 skb->csum_offset = offsetof(struct udphdr, check); in l2tp_xmit_ipv6_csum() 1130 uh->check = ~csum_ipv6_magic(&np->saddr, &np->daddr, in l2tp_xmit_ipv6_csum() 1197 uh->check = 0; in l2tp_xmit_skb() 1211 uh->check = csum_tcpudp_magic(inet->inet_saddr, in l2tp_xmit_skb() 1214 if (uh->check == 0) in l2tp_xmit_skb() [all …]
|
/net/ipv4/ |
D | udp.c | 720 skb->csum_offset = offsetof(struct udphdr, check); in udp4_hwcsum() 721 uh->check = ~csum_tcpudp_magic(src, dst, len, in udp4_hwcsum() 737 uh->check = csum_tcpudp_magic(src, dst, len, IPPROTO_UDP, csum); in udp4_hwcsum() 738 if (uh->check == 0) in udp4_hwcsum() 739 uh->check = CSUM_MANGLED_0; in udp4_hwcsum() 761 uh->check = 0; in udp_send_skb() 780 uh->check = csum_tcpudp_magic(fl4->saddr, fl4->daddr, len, in udp_send_skb() 782 if (uh->check == 0) in udp_send_skb() 783 uh->check = CSUM_MANGLED_0; in udp_send_skb() 1646 if (uh->check == 0) { in udp4_csum_init() [all …]
|