Lines Matching refs:udph
248 struct udphdr *udph; in tcf_csum_ipv4_udp() local
262 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
263 if (udph == NULL) in tcf_csum_ipv4_udp()
267 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
269 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
271 udph->check = 0; in tcf_csum_ipv4_udp()
275 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
276 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
277 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
284 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
287 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
291 if (!udph->check) in tcf_csum_ipv4_udp()
292 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
304 struct udphdr *udph; in tcf_csum_ipv6_udp() local
318 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
319 if (udph == NULL) in tcf_csum_ipv6_udp()
323 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
325 udph->check = 0; in tcf_csum_ipv6_udp()
329 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
331 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
332 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
340 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
343 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
347 if (!udph->check) in tcf_csum_ipv6_udp()
348 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()