/linux-6.1.9/tools/testing/selftests/bpf/progs/ |
D | test_tcp_check_syncookie_kern.c | 52 struct ipv6hdr *ipv6h; in check_syncookie() local 98 ipv6h = data + sizeof(struct ethhdr); in check_syncookie() 99 if (ipv6h + 1 > data_end) in check_syncookie() 102 if (ipv6h->nexthdr != IPPROTO_TCP) in check_syncookie() 109 memcpy(tup.ipv6.saddr, &ipv6h->saddr, sizeof(tup.ipv6.saddr)); in check_syncookie() 110 memcpy(tup.ipv6.daddr, &ipv6h->daddr, sizeof(tup.ipv6.daddr)); in check_syncookie() 122 seq_mss = gen_syncookie(data_end, sk, ipv6h, sizeof(*ipv6h), in check_syncookie() 125 ret = bpf_tcp_check_syncookie(sk, ipv6h, sizeof(*ipv6h), in check_syncookie()
|
/linux-6.1.9/net/ipv6/ |
D | ip6_offload.c | 78 struct ipv6hdr *ipv6h; in ipv6_gso_segment() local 109 ipv6h = (struct ipv6hdr *)skb->data; in ipv6_gso_segment() 110 ipv6h->nexthdr = nexthdr; in ipv6_gso_segment() 113 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) in ipv6_gso_segment() 119 SKB_GSO_CB(skb)->encap_level += sizeof(*ipv6h); in ipv6_gso_segment() 121 ipv6h = ipv6_hdr(skb); in ipv6_gso_segment() 122 __skb_pull(skb, sizeof(*ipv6h)); in ipv6_gso_segment() 125 proto = ipv6_gso_pull_exthdrs(skb, ipv6h->nexthdr); in ipv6_gso_segment() 149 ipv6h = (struct ipv6hdr *)(skb_mac_header(skb) + nhoff); in ipv6_gso_segment() 153 skb->head - (unsigned char *)(ipv6h + 1); in ipv6_gso_segment() [all …]
|
D | udp_offload.c | 36 const struct ipv6hdr *ipv6h; in udp6_ufo_fragment() local 57 ipv6h = ipv6_hdr(skb); in udp6_ufo_fragment() 61 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment() 62 &ipv6h->daddr, csum); in udp6_ufo_fragment() 162 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in udp6_gro_complete() local 184 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete() 185 &ipv6h->daddr, 0); in udp6_gro_complete()
|
D | ip6_tunnel.c | 399 const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)raw; in ip6_tnl_parse_tlv_enc_lim() local 401 unsigned int off = nhoff + sizeof(*ipv6h); in ip6_tnl_parse_tlv_enc_lim() 402 u8 next, nexthdr = ipv6h->nexthdr; in ip6_tnl_parse_tlv_enc_lim() 466 const struct ipv6hdr *ipv6h = (const struct ipv6hdr *)skb->data; in ip6_tnl_err() local 482 t = ip6_tnl_lookup(dev_net(skb->dev), skb->dev->ifindex, &ipv6h->daddr, &ipv6h->saddr); in ip6_tnl_err() 534 len = sizeof(*ipv6h) + ntohs(ipv6h->payload_len); in ip6_tnl_err() 709 const struct ipv6hdr *ipv6h, in ip4ip6_dscp_ecn_decapsulate() argument 712 __u8 dsfield = ipv6_get_dsfield(ipv6h) & ~INET_ECN_MASK; in ip4ip6_dscp_ecn_decapsulate() 717 return IP6_ECN_decapsulate(ipv6h, skb); in ip4ip6_dscp_ecn_decapsulate() 721 const struct ipv6hdr *ipv6h, in ip6ip6_dscp_ecn_decapsulate() argument [all …]
|
D | tcpv6_offload.c | 54 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp6_gso_segment() local 63 __tcp_v6_send_check(skb, &ipv6h->saddr, &ipv6h->daddr); in tcp6_gso_segment()
|
D | ip6_gre.c | 422 const struct ipv6hdr *ipv6h; in ip6gre_err() local 430 ipv6h = (const struct ipv6hdr *)skb->data; in ip6gre_err() 431 t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, in ip6gre_err() 490 const struct ipv6hdr *ipv6h; in ip6gre_rcv() local 493 ipv6h = ipv6_hdr(skb); in ip6gre_rcv() 495 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6gre_rcv() 526 const struct ipv6hdr *ipv6h; in ip6erspan_rcv() local 531 ipv6h = ipv6_hdr(skb); in ip6erspan_rcv() 536 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6erspan_rcv() 662 struct ipv6hdr *ipv6h; in prepare_ip6gre_xmit_ipv6() local [all …]
|
D | ip6_vti.c | 303 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in vti6_input_proto() local 306 t = vti6_tnl_lookup(dev_net(skb->dev), &ipv6h->saddr, &ipv6h->daddr); in vti6_input_proto() 318 ipv6h = ipv6_hdr(skb); in vti6_input_proto() 319 if (!ip6_tnl_rcv_ctl(t, &ipv6h->daddr, &ipv6h->saddr)) { in vti6_input_proto()
|
D | sit.c | 643 const struct ipv6hdr *ipv6h; in packet_is_spoofed() local 655 ipv6h = ipv6_hdr(skb); in packet_is_spoofed() 657 if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) { in packet_is_spoofed() 659 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed() 660 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed() 664 if (likely(!is_spoofed_6rd(tunnel, iph->daddr, &ipv6h->daddr))) in packet_is_spoofed() 667 if (only_dnatted(tunnel, &ipv6h->daddr)) in packet_is_spoofed() 671 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed() 672 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
|
D | tcp_ipv6.c | 982 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp_v6_send_reset() local 1017 key = tcp_v6_md5_do_lookup(sk, &ipv6h->saddr, l3index); in tcp_v6_send_reset() 1031 NULL, 0, &ipv6h->saddr, th->source, in tcp_v6_send_reset() 1032 &ipv6h->daddr, ntohs(th->source), in tcp_v6_send_reset() 1042 key = tcp_v6_md5_do_lookup(sk1, &ipv6h->saddr, l3index); in tcp_v6_send_reset() 1065 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset() 1076 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset() 1080 ipv6_get_dsfield(ipv6h), label, priority, txhash); in tcp_v6_send_reset()
|
D | reassembly.c | 63 static u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h) in ip6_frag_ecn() argument 65 return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK); in ip6_frag_ecn()
|
D | exthdrs.c | 235 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in ipv6_dest_hao() local 262 ret = xfrm6_input_addr(skb, (xfrm_address_t *)&ipv6h->daddr, in ipv6_dest_hao() 276 ipv6h = ipv6_hdr(skb); in ipv6_dest_hao() 282 swap(ipv6h->saddr, hao->addr); in ipv6_dest_hao()
|
D | ip6mr.c | 2035 struct ipv6hdr *ipv6h; in ip6mr_forward2() local 2054 ipv6h = ipv6_hdr(skb); in ip6mr_forward2() 2058 .daddr = ipv6h->daddr, in ip6mr_forward2() 2087 if (skb_cow(skb, sizeof(*ipv6h) + LL_RESERVED_SPACE(vif_dev))) in ip6mr_forward2() 2090 ipv6h = ipv6_hdr(skb); in ip6mr_forward2() 2091 ipv6h->hop_limit--; in ip6mr_forward2()
|
/linux-6.1.9/include/net/ |
D | dsfield.h | 22 static inline __u8 ipv6_get_dsfield(const struct ipv6hdr *ipv6h) in ipv6_get_dsfield() argument 24 return ntohs(*(__force const __be16 *)ipv6h) >> 4; in ipv6_get_dsfield() 44 static inline void ipv6_change_dsfield(struct ipv6hdr *ipv6h,__u8 mask, in ipv6_change_dsfield() argument 47 __be16 *p = (__force __be16 *)ipv6h; in ipv6_change_dsfield()
|
D | ip6_checksum.h | 67 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp_v6_gso_csum_prep() local 70 ipv6h->payload_len = 0; in tcp_v6_gso_csum_prep() 71 th->check = ~tcp_v6_check(0, &ipv6h->saddr, &ipv6h->daddr, 0); in tcp_v6_gso_csum_prep()
|
/linux-6.1.9/net/netfilter/ |
D | xt_TCPMSS.c | 221 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcpmss_tg6() local 227 nexthdr = ipv6h->nexthdr; in tcpmss_tg6() 228 tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr, &frag_off); in tcpmss_tg6() 234 sizeof(*ipv6h) + sizeof(struct tcphdr)); in tcpmss_tg6() 238 ipv6h = ipv6_hdr(skb); in tcpmss_tg6() 239 oldlen = ipv6h->payload_len; in tcpmss_tg6() 244 ipv6h->payload_len = newlen; in tcpmss_tg6()
|
D | nf_nat_proto.c | 387 struct ipv6hdr *ipv6h; in nf_nat_ipv6_manip_pkt() local 392 if (skb_ensure_writable(skb, iphdroff + sizeof(*ipv6h))) in nf_nat_ipv6_manip_pkt() 395 ipv6h = (void *)skb->data + iphdroff; in nf_nat_ipv6_manip_pkt() 396 nexthdr = ipv6h->nexthdr; in nf_nat_ipv6_manip_pkt() 397 hdroff = ipv6_skip_exthdr(skb, iphdroff + sizeof(*ipv6h), in nf_nat_ipv6_manip_pkt() 407 ipv6h = (void *)skb->data + iphdroff; in nf_nat_ipv6_manip_pkt() 411 ipv6h->saddr = target->src.u3.in6; in nf_nat_ipv6_manip_pkt() 413 ipv6h->daddr = target->dst.u3.in6; in nf_nat_ipv6_manip_pkt() 469 const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + iphdroff); in nf_nat_ipv6_csum_update() local 473 oldip = &ipv6h->saddr; in nf_nat_ipv6_csum_update() [all …]
|
D | xt_TCPOPTSTRIP.c | 98 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcpoptstrip_tg6() local 103 nexthdr = ipv6h->nexthdr; in tcpoptstrip_tg6() 104 tcphoff = ipv6_skip_exthdr(skb, sizeof(*ipv6h), &nexthdr, &frag_off); in tcpoptstrip_tg6()
|
/linux-6.1.9/drivers/net/ethernet/netronome/nfp/crypto/ |
D | tls.c | 478 struct ipv6hdr *ipv6h; in nfp_net_tls_rx_resync_req() local 486 ipv6h = pkt + req->l3_offset; in nfp_net_tls_rx_resync_req() 496 switch (ipv6h->version) { in nfp_net_tls_rx_resync_req() 505 &ipv6h->saddr, th->source, in nfp_net_tls_rx_resync_req() 506 &ipv6h->daddr, ntohs(th->dest), in nfp_net_tls_rx_resync_req()
|
/linux-6.1.9/net/tls/ |
D | tls_device_fallback.c | 183 const struct ipv6hdr *ipv6h; in update_chksum() local 197 ipv6h = ipv6_hdr(skb); in update_chksum() 198 th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in update_chksum()
|
/linux-6.1.9/net/sched/ |
D | sch_taprio.c | 299 const struct ipv6hdr *ipv6h; in get_tcp_tstamp() local 303 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in get_tcp_tstamp() 304 if (!ipv6h) in get_tcp_tstamp() 307 if (ipv6h->version == 4) { in get_tcp_tstamp() 308 iph = (struct iphdr *)ipv6h; in get_tcp_tstamp() 315 ipv6h = skb_header_pointer(skb, offset, in get_tcp_tstamp() 318 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in get_tcp_tstamp() 323 } else if (ipv6h->version == 6 && ipv6h->nexthdr != IPPROTO_TCP) { in get_tcp_tstamp()
|
D | sch_cake.c | 905 const struct ipv6hdr *ipv6h; in cake_get_tcphdr() local 911 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in cake_get_tcphdr() 913 if (!ipv6h) in cake_get_tcphdr() 916 if (ipv6h->version == 4) { in cake_get_tcphdr() 917 iph = (struct iphdr *)ipv6h; in cake_get_tcphdr() 924 ipv6h = skb_header_pointer(skb, offset, in cake_get_tcphdr() 927 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in cake_get_tcphdr() 936 } else if (ipv6h->version == 6) { in cake_get_tcphdr() 937 if (ipv6h->nexthdr != IPPROTO_TCP) in cake_get_tcphdr() 1157 const struct ipv6hdr *ipv6h, *ipv6h_check; in cake_ack_filter() local [all …]
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | ktls_rx.c | 507 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph; in resync_update_sn() local 510 th = (void *)ipv6h + sizeof(struct ipv6hdr); in resync_update_sn() 513 &ipv6h->saddr, th->source, in resync_update_sn() 514 &ipv6h->daddr, ntohs(th->dest), in resync_update_sn()
|
/linux-6.1.9/net/ipv6/netfilter/ |
D | nf_conntrack_reasm.c | 128 static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h) in ip6_frag_ecn() argument 130 return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK); in ip6_frag_ecn()
|
/linux-6.1.9/drivers/net/ethernet/netronome/nfp/nfd3/ |
D | dp.c | 123 struct ipv6hdr *ipv6h; in nfp_nfd3_tx_csum() local 138 ipv6h = skb->encapsulation ? inner_ipv6_hdr(skb) : ipv6_hdr(skb); in nfp_nfd3_tx_csum() 143 } else if (ipv6h->version == 6) { in nfp_nfd3_tx_csum() 144 l4_hdr = ipv6h->nexthdr; in nfp_nfd3_tx_csum()
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlx4/ |
D | en_rx.c | 602 struct ipv6hdr *ipv6h) in get_fixed_ipv6_csum() argument 604 __u8 nexthdr = ipv6h->nexthdr; in get_fixed_ipv6_csum() 613 temp = csum_add(hw_checksum, *(__wsum *)ipv6h); in get_fixed_ipv6_csum() 615 skb->csum = csum_add(temp, (__force __wsum)*(__be16 *)&ipv6h->nexthdr); in get_fixed_ipv6_csum()
|