| /linux-6.15/include/net/ |
| H 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()
|
| H 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.15/net/ipv6/ |
| H A D | ip6_offload.c | 111 struct ipv6hdr *ipv6h; in ipv6_gso_segment() local 127 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h)))) in ipv6_gso_segment() 133 SKB_GSO_CB(skb)->encap_level += sizeof(*ipv6h); in ipv6_gso_segment() 135 ipv6h = ipv6_hdr(skb); in ipv6_gso_segment() 136 __skb_pull(skb, sizeof(*ipv6h)); in ipv6_gso_segment() 167 skb->head - (unsigned char *)(ipv6h + 1); in ipv6_gso_segment() 169 payload_len = skb->len - nhoff - sizeof(*ipv6h); in ipv6_gso_segment() 170 ipv6h->payload_len = htons(payload_len); in ipv6_gso_segment() 171 skb->network_header = (u8 *)ipv6h - skb->head; in ipv6_gso_segment() 180 fptr = (struct frag_hdr *)((u8 *)ipv6h + err); in ipv6_gso_segment() [all …]
|
| H A D | udp_offload.c | 37 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() 168 const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + offset); 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()
|
| H A D | ip6_tunnel.c | 534 len = sizeof(*ipv6h) + ntohs(ipv6h->payload_len); in ip6_tnl_err() 864 &ipv6h->saddr, in __ip6_tnl_rcv() 944 ipv6h = ipv6_hdr(skb); in ipxip6_rcv() 945 if (!ip6_tnl_rcv_ctl(t, &ipv6h->daddr, &ipv6h->saddr)) in ipxip6_rcv() 1091 struct ipv6hdr *ipv6h; in ip6_tnl_xmit() local 1274 ipv6h = ipv6_hdr(skb); in ip6_tnl_xmit() 1278 ipv6h->nexthdr = proto; in ip6_tnl_xmit() 1279 ipv6h->saddr = fl6->saddr; in ip6_tnl_xmit() 1297 struct ipv6hdr *ipv6h; in ipxip6_tnl_xmit() local 1332 ipv6h = ipv6_hdr(skb); in ipxip6_tnl_xmit() [all …]
|
| H A D | ip6_gre.c | 423 const struct ipv6hdr *ipv6h; in ip6gre_err() local 432 t = ip6gre_tunnel_lookup(skb->dev, &ipv6h->daddr, &ipv6h->saddr, in ip6gre_err() 494 ipv6h = ipv6_hdr(skb); in ip6gre_rcv() 496 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6gre_rcv() 535 ipv6h = ipv6_hdr(skb); in ip6erspan_rcv() 540 &ipv6h->saddr, &ipv6h->daddr, tpi->key, in ip6erspan_rcv() 667 struct ipv6hdr *ipv6h; in prepare_ip6gre_xmit_ipv6() local 673 ipv6h = ipv6_hdr(skb); in prepare_ip6gre_xmit_ipv6() 1398 struct ipv6hdr *ipv6h; in ip6gre_header() local 1401 ipv6h = skb_push(skb, t->hlen + sizeof(*ipv6h)); in ip6gre_header() [all …]
|
| H A D | tcpv6_offload.c | 181 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp6_gso_segment() local 190 __tcp_v6_send_check(skb, &ipv6h->saddr, &ipv6h->daddr); in tcp6_gso_segment()
|
| H A D | ip6_vti.c | 298 const struct ipv6hdr *ipv6h = ipv6_hdr(skb); in vti6_input_proto() local 301 t = vti6_tnl_lookup(dev_net(skb->dev), &ipv6h->saddr, &ipv6h->daddr); in vti6_input_proto() 313 ipv6h = ipv6_hdr(skb); in vti6_input_proto() 314 if (!ip6_tnl_rcv_ctl(t, &ipv6h->daddr, &ipv6h->saddr)) { in vti6_input_proto()
|
| H A D | sit.c | 646 const struct ipv6hdr *ipv6h; in packet_is_spoofed() local 658 ipv6h = ipv6_hdr(skb); in packet_is_spoofed() 660 if (unlikely(is_spoofed_6rd(tunnel, iph->saddr, &ipv6h->saddr))) { in packet_is_spoofed() 662 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed() 663 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed() 667 if (likely(!is_spoofed_6rd(tunnel, iph->daddr, &ipv6h->daddr))) in packet_is_spoofed() 670 if (only_dnatted(tunnel, &ipv6h->daddr)) in packet_is_spoofed() 674 &iph->saddr, &ipv6h->saddr, in packet_is_spoofed() 675 &iph->daddr, &ipv6h->daddr); in packet_is_spoofed()
|
| H 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()
|
| H A D | tcp_ipv6.c | 1016 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in tcp_v6_send_reset() local 1059 key.md5_key = tcp_v6_md5_do_lookup(sk, &ipv6h->saddr, l3index); in tcp_v6_send_reset() 1075 NULL, 0, &ipv6h->saddr, th->source, in tcp_v6_send_reset() 1076 &ipv6h->daddr, ntohs(th->source), in tcp_v6_send_reset() 1086 key.md5_key = tcp_v6_md5_do_lookup(sk1, &ipv6h->saddr, l3index); in tcp_v6_send_reset() 1121 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset() 1132 label = ip6_flowlabel(ipv6h); in tcp_v6_send_reset() 1138 ipv6_get_dsfield(ipv6h) & ~INET_ECN_MASK, in tcp_v6_send_reset()
|
| H 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()
|
| /linux-6.15/net/netfilter/ |
| H 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()
|
| H 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() 920 struct ipv6hdr *ipv6h = ipv6_hdr(skb); in nf_nat_icmpv6_reply_translation() local [all …]
|
| H 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.15/drivers/net/ethernet/netronome/nfp/crypto/ |
| H 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.15/net/tls/ |
| H A D | tls_device_fallback.c | 159 const struct ipv6hdr *ipv6h; in update_chksum() local 173 ipv6h = ipv6_hdr(skb); in update_chksum() 174 th->check = ~csum_ipv6_magic(&ipv6h->saddr, &ipv6h->daddr, in update_chksum()
|
| /linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
| H A D | ktls_rx.c | 506 struct ipv6hdr *ipv6h = (struct ipv6hdr *)iph; in resync_update_sn() local 509 th = (void *)ipv6h + sizeof(struct ipv6hdr); in resync_update_sn() 512 &ipv6h->saddr, th->source, in resync_update_sn() 513 &ipv6h->daddr, ntohs(th->dest), in resync_update_sn()
|
| /linux-6.15/net/sched/ |
| H A D | sch_cake.c | 952 const struct ipv6hdr *ipv6h; in cake_get_tcphdr() local 960 if (!ipv6h) in cake_get_tcphdr() 963 if (ipv6h->version == 4) { in cake_get_tcphdr() 964 iph = (struct iphdr *)ipv6h; in cake_get_tcphdr() 971 ipv6h = skb_header_pointer(skb, offset, in cake_get_tcphdr() 974 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in cake_get_tcphdr() 983 } else if (ipv6h->version == 6) { in cake_get_tcphdr() 984 if (ipv6h->nexthdr != IPPROTO_TCP) in cake_get_tcphdr() 1204 const struct ipv6hdr *ipv6h, *ipv6h_check; in cake_ack_filter() local 1262 ipv6h = (struct ipv6hdr *)iph; in cake_ack_filter() [all …]
|
| H A D | sch_taprio.c | 417 const struct ipv6hdr *ipv6h; in get_tcp_tstamp() local 421 ipv6h = skb_header_pointer(skb, offset, sizeof(_ipv6h), &_ipv6h); in get_tcp_tstamp() 422 if (!ipv6h) in get_tcp_tstamp() 425 if (ipv6h->version == 4) { in get_tcp_tstamp() 426 iph = (struct iphdr *)ipv6h; in get_tcp_tstamp() 433 ipv6h = skb_header_pointer(skb, offset, in get_tcp_tstamp() 436 if (!ipv6h || ipv6h->nexthdr != IPPROTO_TCP) in get_tcp_tstamp() 441 } else if (ipv6h->version == 6 && ipv6h->nexthdr != IPPROTO_TCP) { in get_tcp_tstamp()
|
| /linux-6.15/net/ipv6/netfilter/ |
| H A D | nf_conntrack_reasm.c | 129 static inline u8 ip6_frag_ecn(const struct ipv6hdr *ipv6h) in ip6_frag_ecn() argument 131 return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK); in ip6_frag_ecn()
|
| /linux-6.15/drivers/net/ethernet/marvell/octeontx2/nic/ |
| H A D | cn10k_ipsec.c | 837 struct ipv6hdr *ipv6h; in cn10k_ipsec_get_ip_data_len() local 848 ipv6h = (struct ipv6hdr *)src; in cn10k_ipsec_get_ip_data_len() 849 return ntohs(ipv6h->payload_len) + sizeof(struct ipv6hdr); in cn10k_ipsec_get_ip_data_len()
|
| /linux-6.15/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | en_rx.c | 569 struct ipv6hdr *ipv6h) in get_fixed_ipv6_csum() argument 571 __u8 nexthdr = ipv6h->nexthdr; in get_fixed_ipv6_csum() 580 temp = csum_add(hw_checksum, *(__wsum *)ipv6h); in get_fixed_ipv6_csum() 582 skb->csum = csum_add(temp, (__force __wsum)*(__be16 *)&ipv6h->nexthdr); in get_fixed_ipv6_csum()
|
| /linux-6.15/drivers/net/ethernet/netronome/nfp/nfd3/ |
| H A D | dp.c | 127 struct ipv6hdr *ipv6h; in nfp_nfd3_tx_csum() local 142 ipv6h = skb->encapsulation ? inner_ipv6_hdr(skb) : ipv6_hdr(skb); in nfp_nfd3_tx_csum() 147 } else if (ipv6h->version == 6) { in nfp_nfd3_tx_csum() 148 l4_hdr = ipv6h->nexthdr; in nfp_nfd3_tx_csum()
|
| /linux-6.15/drivers/net/ethernet/qlogic/qlcnic/ |
| H A D | qlcnic_io.c | 1270 struct ipv6hdr *ipv6h; in qlcnic_process_lro() local 1322 ipv6h = (struct ipv6hdr *)skb->data; in qlcnic_process_lro() 1325 ipv6h->payload_len = htons(length); in qlcnic_process_lro() 1791 struct ipv6hdr *ipv6h; in qlcnic_83xx_process_lro() local 1843 ipv6h = (struct ipv6hdr *)skb->data; in qlcnic_83xx_process_lro() 1847 ipv6h->payload_len = htons(length); in qlcnic_83xx_process_lro()
|