/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 139 struct udphdr *udph; in udp_snat_handler() local 151 if (skb_ensure_writable(skb, udphoff + sizeof(*udph))) in udp_snat_handler() 173 udph = (void *)skb_network_header(skb) + udphoff; in udp_snat_handler() 174 udph->source = cp->vport; in udp_snat_handler() 180 udp_partial_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, in udp_snat_handler() 183 } else if (!payload_csum && (udph->check != 0)) { in udp_snat_handler() 185 udp_fast_csum_update(cp->af, udph, &cp->daddr, &cp->vaddr, in udp_snat_handler() 192 udph->check = 0; in udp_snat_handler() 196 udph->check = csum_ipv6_magic(&cp->vaddr.in6, in udp_snat_handler() 202 udph->check = csum_tcpudp_magic(cp->vaddr.ip, in udp_snat_handler() [all …]
|
D | ip_vs_xmit.c | 1027 struct udphdr *udph; /* Our new UDP header */ in ipvs_gue_encap() local 1082 udph = udp_hdr(skb); in ipvs_gue_encap() 1085 udph->dest = dport; in ipvs_gue_encap() 1086 udph->source = sport; in ipvs_gue_encap() 1087 udph->len = htons(skb->len); in ipvs_gue_encap() 1088 udph->check = 0; in ipvs_gue_encap()
|
D | ip_vs_core.c | 1584 struct udphdr _udph, *udph; in ipvs_udp_decap() local 1587 udph = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in ipvs_udp_decap() 1588 if (!udph) in ipvs_udp_decap() 1591 dest = ip_vs_find_tunnel(ipvs, af, daddr, udph->dest); in ipvs_udp_decap()
|
/net/sched/ |
D | act_csum.c | 259 struct udphdr *udph; in tcf_csum_ipv4_udp() local 273 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp() 274 if (udph == NULL) in tcf_csum_ipv4_udp() 278 ul = ntohs(udph->len); in tcf_csum_ipv4_udp() 280 if (udplite || udph->check) { in tcf_csum_ipv4_udp() 282 udph->check = 0; in tcf_csum_ipv4_udp() 286 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp() 287 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp() 288 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp() 295 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp() [all …]
|
D | act_nat.c | 185 struct udphdr *udph; in tcf_nat_act() local 187 if (!pskb_may_pull(skb, ihl + sizeof(*udph) + noff) || in tcf_nat_act() 188 skb_try_make_writable(skb, ihl + sizeof(*udph) + noff)) in tcf_nat_act() 191 udph = (void *)(skb_network_header(skb) + ihl); 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/ipv4/netfilter/ |
D | nf_nat_snmp_basic_main.c | 129 struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in snmp_translate() local 130 u16 datalen = ntohs(udph->len) - sizeof(struct udphdr); in snmp_translate() 131 char *data = (unsigned char *)udph + sizeof(struct udphdr); in snmp_translate() 146 ctx.begin = (unsigned char *)udph + sizeof(struct udphdr); in snmp_translate() 147 ctx.check = &udph->check; in snmp_translate() 167 const struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in help() local 170 if (udph->source == htons(SNMP_PORT) && dir != IP_CT_DIR_REPLY) in help() 172 if (udph->dest == htons(SNMP_TRAP_PORT) && dir != IP_CT_DIR_ORIGINAL) in help() 184 if (ntohs(udph->len) != skb->len - (iph->ihl << 2)) { in help()
|
/net/netfilter/ |
D | nf_flow_table_ip.c | 57 struct udphdr *udph; in nf_flow_nat_ip_udp() local 59 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_ip_udp() 60 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_ip_udp() 63 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_ip_udp() 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() 325 struct udphdr *udph; in nf_flow_nat_ipv6_udp() local 327 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_ipv6_udp() [all …]
|
D | nf_nat_helper.c | 145 struct udphdr *udph; in nf_nat_mangle_udp_packet() local 156 udph = (void *)skb->data + protoff; in nf_nat_mangle_udp_packet() 159 mangle_contents(skb, protoff + sizeof(*udph), in nf_nat_mangle_udp_packet() 164 udph->len = htons(datalen); in nf_nat_mangle_udp_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()
|
D | nf_flow_table_core.c | 365 struct udphdr *udph; in nf_flow_nat_port_udp() local 367 if (!pskb_may_pull(skb, thoff + sizeof(*udph)) || in nf_flow_nat_port_udp() 368 skb_try_make_writable(skb, thoff + sizeof(*udph))) in nf_flow_nat_port_udp() 371 udph = (void *)(skb_network_header(skb) + thoff); in nf_flow_nat_port_udp() 372 if (udph->check || skb->ip_summed == CHECKSUM_PARTIAL) { in nf_flow_nat_port_udp() 373 inet_proto_csum_replace2(&udph->check, skb, port, in nf_flow_nat_port_udp() 375 if (!udph->check) in nf_flow_nat_port_udp() 376 udph->check = CSUM_MANGLED_0; in nf_flow_nat_port_udp()
|
/net/core/ |
D | netpoll.c | 366 struct udphdr *udph; in netpoll_send_udp() local 374 udp_len = len + sizeof(*udph); in netpoll_send_udp() 390 skb_push(skb, sizeof(*udph)); in netpoll_send_udp() 392 udph = udp_hdr(skb); in netpoll_send_udp() 393 udph->source = htons(np->local_port); in netpoll_send_udp() 394 udph->dest = htons(np->remote_port); in netpoll_send_udp() 395 udph->len = htons(udp_len); in netpoll_send_udp() 398 udph->check = 0; in netpoll_send_udp() 399 udph->check = csum_ipv6_magic(&np->local_ip.in6, in netpoll_send_udp() 402 csum_partial(udph, udp_len, 0)); in netpoll_send_udp() [all …]
|
D | pktgen.c | 2724 struct udphdr *udph; in fill_packet_ipv4() local 2785 udph = skb_put(skb, sizeof(struct udphdr)); in fill_packet_ipv4() 2798 udph->source = htons(pkt_dev->cur_udp_src); in fill_packet_ipv4() 2799 udph->dest = htons(pkt_dev->cur_udp_dst); in fill_packet_ipv4() 2800 udph->len = htons(datalen + 8); /* DATA + udphdr */ in fill_packet_ipv4() 2801 udph->check = 0; in fill_packet_ipv4() 2832 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in fill_packet_ipv4() 2835 if (udph->check == 0) in fill_packet_ipv4() 2836 udph->check = CSUM_MANGLED_0; in fill_packet_ipv4() 2852 struct udphdr *udph; in fill_packet_ipv6() local [all …]
|
/net/ipv4/ |
D | ipconfig.c | 605 struct udphdr udph; /* UDP header */ member 826 b->udph.source = htons(68); in ic_bootp_send_if() 827 b->udph.dest = htons(67); in ic_bootp_send_if() 828 b->udph.len = htons(sizeof(struct bootp_pkt) - sizeof(struct iphdr)); in ic_bootp_send_if() 999 if (b->udph.source != htons(67) || b->udph.dest != htons(68)) in ic_bootp_recv() 1002 if (ntohs(h->tot_len) < ntohs(b->udph.len) + sizeof(struct iphdr)) in ic_bootp_recv() 1005 len = ntohs(b->udph.len) - sizeof(struct udphdr); in ic_bootp_recv()
|
D | route.c | 2975 struct udphdr *udph; in inet_rtm_getroute_build_skb() local 2977 udph = skb_put_zero(skb, sizeof(struct udphdr)); in inet_rtm_getroute_build_skb() 2978 udph->source = sport; in inet_rtm_getroute_build_skb() 2979 udph->dest = dport; in inet_rtm_getroute_build_skb() 2980 udph->len = sizeof(struct udphdr); in inet_rtm_getroute_build_skb() 2981 udph->check = 0; in inet_rtm_getroute_build_skb()
|