Lines Matching refs:udph

219 	struct udphdr *udph;  in tcf_csum_ipv4_udp()  local
230 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
231 if (udph == NULL) in tcf_csum_ipv4_udp()
235 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
237 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
239 udph->check = 0; in tcf_csum_ipv4_udp()
243 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
244 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
245 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
252 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
255 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
259 if (!udph->check) in tcf_csum_ipv4_udp()
260 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
272 struct udphdr *udph; in tcf_csum_ipv6_udp() local
283 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
284 if (udph == NULL) in tcf_csum_ipv6_udp()
288 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
290 udph->check = 0; in tcf_csum_ipv6_udp()
294 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
296 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
297 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
305 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
308 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
312 if (!udph->check) in tcf_csum_ipv6_udp()
313 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()