Lines Matching full:udph

258 	struct udphdr *udph;  in tcf_csum_ipv4_udp()  local
267 * udph->len to get the real length without any protocol check, in tcf_csum_ipv4_udp()
268 * UDPLITE uses udph->len for another thing, in tcf_csum_ipv4_udp()
272 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
273 if (udph == NULL) in tcf_csum_ipv4_udp()
277 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
279 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
281 udph->check = 0; in tcf_csum_ipv4_udp()
285 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
286 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
287 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
294 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
297 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
301 if (!udph->check) in tcf_csum_ipv4_udp()
302 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
314 struct udphdr *udph; in tcf_csum_ipv6_udp() local
323 * udph->len to get the real length without any protocol check, in tcf_csum_ipv6_udp()
324 * UDPLITE uses udph->len for another thing, in tcf_csum_ipv6_udp()
328 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
329 if (udph == NULL) in tcf_csum_ipv6_udp()
333 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
335 udph->check = 0; in tcf_csum_ipv6_udp()
339 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
341 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
342 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
350 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
353 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
357 if (!udph->check) in tcf_csum_ipv6_udp()
358 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()