Lines Matching refs:udph

256 	struct udphdr *udph;  in tcf_csum_ipv4_udp()  local
270 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
271 if (udph == NULL) in tcf_csum_ipv4_udp()
275 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
277 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
279 udph->check = 0; in tcf_csum_ipv4_udp()
283 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
284 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
285 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
292 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
295 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
299 if (!udph->check) in tcf_csum_ipv4_udp()
300 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
312 struct udphdr *udph; in tcf_csum_ipv6_udp() local
326 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
327 if (udph == NULL) in tcf_csum_ipv6_udp()
331 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
333 udph->check = 0; in tcf_csum_ipv6_udp()
337 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
339 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
340 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
348 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
351 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
355 if (!udph->check) in tcf_csum_ipv6_udp()
356 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()