Lines Matching full:ipv6
312 __u8 *ttl, bool ipv6) in values_get_tcpipopts() argument
319 if (ipv6) in values_get_tcpipopts()
328 *mss = ipv6 ? DEFAULT_MSS6 : DEFAULT_MSS4; in values_get_tcpipopts()
371 struct ipv6hdr *ipv6; member
385 hdr->ipv6 = NULL; in tcp_dissect()
403 hdr->ipv6 = (void *)hdr->eth + sizeof(*hdr->eth); in tcp_dissect()
404 if (hdr->ipv6 + 1 > data_end) in tcp_dissect()
406 if (hdr->ipv6->version != 6) in tcp_dissect()
412 if (hdr->ipv6->nexthdr != NEXTHDR_TCP) in tcp_dissect()
415 hdr->tcp = (void *)hdr->ipv6 + sizeof(*hdr->ipv6); in tcp_dissect()
453 } else if (hdr->ipv6) { in tcp_lookup()
454 __builtin_memcpy(tup.ipv6.saddr, &hdr->ipv6->saddr, sizeof(tup.ipv6.saddr)); in tcp_lookup()
455 __builtin_memcpy(tup.ipv6.daddr, &hdr->ipv6->daddr, sizeof(tup.ipv6.daddr)); in tcp_lookup()
456 tup.ipv6.sport = hdr->tcp->source; in tcp_lookup()
457 tup.ipv6.dport = hdr->tcp->dest; in tcp_lookup()
458 tup_size = sizeof(tup.ipv6); in tcp_lookup()
460 /* The verifier can't track that either ipv4 or ipv6 is not in tcp_lookup()
570 swap(hdr->ipv6->saddr, hdr->ipv6->daddr); in tcpv6_gen_synack()
571 *(__be32 *)hdr->ipv6 = bpf_htonl(0x60000000); in tcpv6_gen_synack()
572 hdr->ipv6->hop_limit = ttl; in tcpv6_gen_synack()
577 hdr->ipv6->payload_len = bpf_htons(hdr->tcp_len); in tcpv6_gen_synack()
639 } else if (hdr->ipv6) { in syncookie_handle_syn()
644 if (csum_ipv6_magic(&hdr->ipv6->saddr, &hdr->ipv6->daddr, in syncookie_handle_syn()
648 ip_len = sizeof(*hdr->ipv6); in syncookie_handle_syn()
650 value = bpf_tcp_raw_gen_syncookie_ipv6(hdr->ipv6, hdr->tcp, in syncookie_handle_syn()
683 } else if (hdr->ipv6) { in syncookie_handle_syn()
706 } else if (hdr->ipv6) { in syncookie_handle_syn()
707 hdr->tcp->check = csum_ipv6_magic(&hdr->ipv6->saddr, in syncookie_handle_syn()
708 &hdr->ipv6->daddr, in syncookie_handle_syn()
741 else if (hdr->ipv6) in syncookie_handle_ack()
742 err = bpf_tcp_raw_check_syncookie_ipv6(hdr->ipv6, hdr->tcp); in syncookie_handle_ack()
800 } else if (hdr->ipv6) { in syncookie_part2()
802 hdr->ipv6 = (void *)hdr->eth + sizeof(*hdr->eth); in syncookie_part2()
803 hdr->tcp = (void *)hdr->ipv6 + sizeof(*hdr->ipv6); in syncookie_part2()