/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A 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.3-rc2/include/net/ |
A 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()
|
A 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.3-rc2/net/ipv6/ |
A D | ip6_offload.c | 78 struct ipv6hdr *ipv6h; in ipv6_gso_segment() local 94 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) in ipv6_gso_segment() 100 SKB_GSO_CB(skb)->encap_level += sizeof(*ipv6h); in ipv6_gso_segment() 102 ipv6h = ipv6_hdr(skb); in ipv6_gso_segment() 103 __skb_pull(skb, sizeof(*ipv6h)); in ipv6_gso_segment() 134 skb->head - (unsigned char *)(ipv6h + 1); in ipv6_gso_segment() 136 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment() 137 ipv6h->payload_len = htons(payload_len); in ipv6_gso_segment() 138 skb->network_header = (u8 *)ipv6h - skb->head; in ipv6_gso_segment() 147 fptr = (struct frag_hdr *)((u8 *)ipv6h + err); in ipv6_gso_segment() [all …]
|
A D | udp_offload.c | 36 const struct ipv6hdr *ipv6h; in udp6_ufo_fragment() local 58 ipv6h = ipv6_hdr(skb); in udp6_ufo_fragment() 62 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment() 63 &ipv6h->daddr, csum); in udp6_ufo_fragment() 164 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in udp6_gro_complete() local 186 uh->check = ~udp_v6_check(skb->len - nhoff, &ipv6h->saddr, in udp6_gro_complete() 187 &ipv6h->daddr, 0); in udp6_gro_complete()
|
A D | ip6_tunnel.c | 534 len = sizeof(*ipv6h) + ntohs(ipv6h->payload_len); in ip6_tnl_err() 832 ipv6h = ipv6_hdr(skb); in __ip6_tnl_rcv() 849 &ipv6h->saddr, in __ip6_tnl_rcv() 929 ipv6h = ipv6_hdr(skb); in ipxip6_rcv() 930 if (!ip6_tnl_rcv_ctl(t, &ipv6h->daddr, &ipv6h->saddr)) in ipxip6_rcv() 1074 struct ipv6hdr *ipv6h; in ip6_tnl_xmit() local 1257 ipv6h = ipv6_hdr(skb); in ip6_tnl_xmit() 1261 ipv6h->nexthdr = proto; in ip6_tnl_xmit() 1280 struct ipv6hdr *ipv6h; in ipxip6_tnl_xmit() local 1315 ipv6h = ipv6_hdr(skb); in ipxip6_tnl_xmit() [all …]
|
A 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()
|
A D | ip6_gre.c | 422 const struct ipv6hdr *ipv6h; in ip6gre_err() local 431 t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, in ip6gre_err() 493 ipv6h = ipv6_hdr(skb); in ip6gre_rcv() 495 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6gre_rcv() 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 668 ipv6h = ipv6_hdr(skb); in prepare_ip6gre_xmit_ipv6() 1377 struct ipv6hdr *ipv6h; in ip6gre_header() local 1380 ipv6h = skb_push(skb, t->hlen + sizeof(*ipv6h)); in ip6gre_header() [all …]
|
A 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()
|
A 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()
|
A 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()
|
A 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()
|
A 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()
|
A 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.3-rc2/net/netfilter/ |
A 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()
|
A D | nf_nat_proto.c | 387 struct ipv6hdr *ipv6h; in nf_nat_ipv6_manip_pkt() local 395 ipv6h = (void *)skb->data + iphdroff; in nf_nat_ipv6_manip_pkt() 396 nexthdr = ipv6h->nexthdr; 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() 473 oldip = &ipv6h->saddr; in nf_nat_ipv6_csum_update() 476 oldip = &ipv6h->daddr; in nf_nat_ipv6_csum_update() 530 *check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in nf_nat_ipv6_csum_recalc() 883 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in nf_nat_icmpv6_reply_translation() local [all …]
|
A 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.3-rc2/drivers/net/ethernet/netronome/nfp/crypto/ |
A 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.3-rc2/net/tls/ |
A 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.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
A D | ktls_rx.c | 508 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph; in resync_update_sn() local 511 th = (void *)ipv6h + sizeof(struct ipv6hdr); in resync_update_sn() 514 &ipv6h->saddr, th->source, in resync_update_sn() 515 &ipv6h->daddr, ntohs(th->dest), in resync_update_sn()
|
/linux-6.3-rc2/net/sched/ |
A D | sch_cake.c | 905 const struct ipv6hdr *ipv6h; in cake_get_tcphdr() local 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 1215 ipv6h = (struct ipv6hdr *)iph; in cake_ack_filter() [all …]
|
A D | sch_taprio.c | 423 const struct ipv6hdr *ipv6h; in get_tcp_tstamp() local 427 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in get_tcp_tstamp() 428 if (!ipv6h) in get_tcp_tstamp() 431 if (ipv6h->version == 4) { in get_tcp_tstamp() 432 iph = (struct iphdr *)ipv6h; in get_tcp_tstamp() 439 ipv6h = skb_header_pointer(skb, offset, in get_tcp_tstamp() 442 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in get_tcp_tstamp() 447 } else if (ipv6h->version == 6 && ipv6h->nexthdr != IPPROTO_TCP) { in get_tcp_tstamp()
|
/linux-6.3-rc2/net/ipv6/netfilter/ |
A 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.3-rc2/drivers/net/ethernet/mellanox/mlx4/ |
A 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()
|
/linux-6.3-rc2/drivers/net/ethernet/netronome/nfp/nfd3/ |
A D | dp.c | 124 struct ipv6hdr *ipv6h; in nfp_nfd3_tx_csum() local 139 ipv6h = skb->encapsulation ? inner_ipv6_hdr(skb) : ipv6_hdr(skb); in nfp_nfd3_tx_csum() 144 } else if (ipv6h->version == 6) { in nfp_nfd3_tx_csum() 145 l4_hdr = ipv6h->nexthdr; in nfp_nfd3_tx_csum()
|