Lines Matching refs:udph

220 	struct udphdr *udph;  in tcf_csum_ipv4_udp()  local
231 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv4_udp()
232 if (udph == NULL) in tcf_csum_ipv4_udp()
236 ul = ntohs(udph->len); in tcf_csum_ipv4_udp()
238 if (udplite || udph->check) { in tcf_csum_ipv4_udp()
240 udph->check = 0; in tcf_csum_ipv4_udp()
244 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv4_udp()
245 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv4_udp()
246 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
253 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv4_udp()
256 udph->check = csum_tcpudp_magic(iph->saddr, iph->daddr, in tcf_csum_ipv4_udp()
260 if (!udph->check) in tcf_csum_ipv4_udp()
261 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv4_udp()
273 struct udphdr *udph; in tcf_csum_ipv6_udp() local
284 udph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*udph)); in tcf_csum_ipv6_udp()
285 if (udph == NULL) in tcf_csum_ipv6_udp()
289 ul = ntohs(udph->len); in tcf_csum_ipv6_udp()
291 udph->check = 0; in tcf_csum_ipv6_udp()
295 skb->csum = csum_partial(udph, ipl - ihl, 0); in tcf_csum_ipv6_udp()
297 else if ((ul >= sizeof(*udph)) && (ul <= ipl - ihl)) in tcf_csum_ipv6_udp()
298 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
306 skb->csum = csum_partial(udph, ul, 0); in tcf_csum_ipv6_udp()
309 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp()
313 if (!udph->check) in tcf_csum_ipv6_udp()
314 udph->check = CSUM_MANGLED_0; in tcf_csum_ipv6_udp()