Lines Matching refs:udph
257 struct udphdr *udph; in tcf_csum_ipv4_udp() local
271 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
272 if (udph == NULL) in tcf_csum_ipv4_udp()
276 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
278 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
280 udph->check = 0; in tcf_csum_ipv4_udp()
284 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
285 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
286 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
293 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
296 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
300 if (!udph->check) in tcf_csum_ipv4_udp()
301 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
313 struct udphdr *udph; in tcf_csum_ipv6_udp() local
327 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
328 if (udph == NULL) in tcf_csum_ipv6_udp()
332 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
334 udph->check = 0; in tcf_csum_ipv6_udp()
338 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
340 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
341 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
349 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
352 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
356 if (!udph->check) in tcf_csum_ipv6_udp()
357 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()