/Linux-v4.19/include/net/netfilter/ |
D | nf_queue.h | 55 static inline u32 hash_v6(const struct ipv6hdr *ip6h, u32 initval) in hash_v6() argument 59 if ((__force u32)ip6h->saddr.s6_addr32[3] < in hash_v6() 60 (__force u32)ip6h->daddr.s6_addr32[3]) { in hash_v6() 61 a = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6() 62 b = (__force u32) ip6h->daddr.s6_addr32[3]; in hash_v6() 64 b = (__force u32) ip6h->saddr.s6_addr32[3]; in hash_v6() 65 a = (__force u32) ip6h->daddr.s6_addr32[3]; in hash_v6() 68 if ((__force u32)ip6h->saddr.s6_addr32[1] < in hash_v6() 69 (__force u32)ip6h->daddr.s6_addr32[1]) in hash_v6() 70 c = (__force u32) ip6h->saddr.s6_addr32[1]; in hash_v6() [all …]
|
D | nf_tables_ipv6.h | 32 struct ipv6hdr *ip6h, _ip6h; in __nft_set_pktinfo_ipv6_validate() local 38 ip6h = skb_header_pointer(skb, skb_network_offset(skb), sizeof(*ip6h), in __nft_set_pktinfo_ipv6_validate() 40 if (!ip6h) in __nft_set_pktinfo_ipv6_validate() 43 if (ip6h->version != 6) in __nft_set_pktinfo_ipv6_validate() 46 pkt_len = ntohs(ip6h->payload_len); in __nft_set_pktinfo_ipv6_validate() 47 if (pkt_len + sizeof(*ip6h) > skb->len) in __nft_set_pktinfo_ipv6_validate()
|
/Linux-v4.19/samples/bpf/ |
D | xdp_tx_iptunnel_kern.c | 159 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6() local 164 if (ip6h + 1 > data_end) in handle_ipv6() 167 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6() 171 vip.protocol = ip6h->nexthdr; in handle_ipv6() 173 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); in handle_ipv6() 175 payload_len = ip6h->payload_len; in handle_ipv6() 191 ip6h = data + sizeof(*new_eth); in handle_ipv6() 192 old_eth = data + sizeof(*ip6h); in handle_ipv6() 196 ip6h + 1 > data_end) in handle_ipv6() 201 ip6h->version = 6; in handle_ipv6() [all …]
|
D | xdp_fwd_kern.c | 49 struct ipv6hdr *ip6h; in xdp_fwd_flags() local 83 ip6h = data + nh_off; in xdp_fwd_flags() 84 if (ip6h + 1 > data_end) in xdp_fwd_flags() 87 if (ip6h->hop_limit <= 1) in xdp_fwd_flags() 91 fib_params.flowinfo = *(__be32 *)ip6h & IPV6_FLOWINFO_MASK; in xdp_fwd_flags() 92 fib_params.l4_protocol = ip6h->nexthdr; in xdp_fwd_flags() 95 fib_params.tot_len = ntohs(ip6h->payload_len); in xdp_fwd_flags() 96 *src = ip6h->saddr; in xdp_fwd_flags() 97 *dst = ip6h->daddr; in xdp_fwd_flags() 116 ip6h->hop_limit--; in xdp_fwd_flags()
|
D | tc_l2_redirect_kern.c | 91 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_iptun_ingress_forward() local 93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_iptun_ingress_forward() 96 if (ip6h->nexthdr != IPPROTO_IPIP && in _l2_to_iptun_ingress_forward() 97 ip6h->nexthdr != IPPROTO_IPV6) in _l2_to_iptun_ingress_forward() 101 _htonl(ip6h->daddr.s6_addr32[0]), in _l2_to_iptun_ingress_forward() 102 _htonl(ip6h->daddr.s6_addr32[3])); in _l2_to_iptun_ingress_forward() 180 struct ipv6hdr *ip6h = data + sizeof(*eth); in _l2_to_ip6tun_ingress_redirect() local 182 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_ip6tun_ingress_redirect() 185 if (!is_vip_addr(eth->h_proto, ip6h->daddr.s6_addr32[0])) in _l2_to_ip6tun_ingress_redirect() 189 _htonl(ip6h->daddr.s6_addr32[0]), *ifindex); in _l2_to_ip6tun_ingress_redirect() [all …]
|
D | parse_varlen.c | 80 struct ipv6hdr *ip6h; in parse_ipv6() local 85 ip6h = data + nh_off; in parse_ipv6() 86 if (ip6h + 1 > data_end) in parse_ipv6() 89 nexthdr = ip6h->nexthdr; in parse_ipv6() 98 ip6h = data + nh_off + ihl_len; in parse_ipv6() 99 if (ip6h + 1 > data_end) in parse_ipv6() 102 nexthdr = ip6h->nexthdr; in parse_ipv6()
|
D | test_cgrp2_tc_kern.c | 46 struct ipv6hdr *ip6h = data + sizeof(*eth); in handle_egress() local 53 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in handle_egress() 57 ip6h->nexthdr != IPPROTO_ICMPV6) { in handle_egress() 59 eth->h_proto, ip6h->nexthdr); in handle_egress()
|
D | xdp_redirect_cpu_kern.c | 193 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6() local 195 if (ip6h + 1 > data_end) in get_proto_ipv6() 197 return ip6h->nexthdr; in get_proto_ipv6() 490 struct ipv6hdr *ip6h = data + nh_off; in get_ipv6_hash_ip_pair() local 493 if (ip6h + 1 > data_end) in get_ipv6_hash_ip_pair() 496 cpu_hash = ip6h->saddr.s6_addr32[0] + ip6h->daddr.s6_addr32[0]; in get_ipv6_hash_ip_pair() 497 cpu_hash += ip6h->saddr.s6_addr32[1] + ip6h->daddr.s6_addr32[1]; in get_ipv6_hash_ip_pair() 498 cpu_hash += ip6h->saddr.s6_addr32[2] + ip6h->daddr.s6_addr32[2]; in get_ipv6_hash_ip_pair() 499 cpu_hash += ip6h->saddr.s6_addr32[3] + ip6h->daddr.s6_addr32[3]; in get_ipv6_hash_ip_pair() 500 cpu_hash = SuperFastHash((char *)&cpu_hash, 4, INITVAL + ip6h->nexthdr); in get_ipv6_hash_ip_pair()
|
/Linux-v4.19/tools/testing/selftests/bpf/ |
D | test_xdp.c | 160 struct ipv6hdr *ip6h = data + sizeof(struct ethhdr); in handle_ipv6() local 165 if (ip6h + 1 > data_end) in handle_ipv6() 168 dport = get_dport(ip6h + 1, data_end, ip6h->nexthdr); in handle_ipv6() 172 vip.protocol = ip6h->nexthdr; in handle_ipv6() 174 memcpy(vip.daddr.v6, ip6h->daddr.s6_addr32, sizeof(vip.daddr)); in handle_ipv6() 176 payload_len = ip6h->payload_len; in handle_ipv6() 190 ip6h = data + sizeof(*new_eth); in handle_ipv6() 191 old_eth = data + sizeof(*ip6h); in handle_ipv6() 194 ip6h + 1 > data_end) in handle_ipv6() 199 ip6h->version = 6; in handle_ipv6() [all …]
|
D | test_xdp_noinline.c | 295 struct ipv6hdr *ip6h; in encap_v6() local 305 ip6h = data + sizeof(struct eth_hdr); in encap_v6() 308 old_eth + 1 > data_end || ip6h + 1 > data_end) in encap_v6() 313 ip6h->version = 6; in encap_v6() 314 ip6h->priority = 0; in encap_v6() 315 memset(ip6h->flow_lbl, 0, sizeof(ip6h->flow_lbl)); in encap_v6() 317 ip6h->nexthdr = IPPROTO_IPV6; in encap_v6() 319 ip6h->payload_len = in encap_v6() 321 ip6h->hop_limit = 4; in encap_v6() 323 ip6h->saddr.in6_u.u6_addr32[0] = 1; in encap_v6() [all …]
|
D | test_pkt_access.c | 45 struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1); in process() local 47 if (ip6h + 1 > data_end) in process() 49 ihl_len = sizeof(*ip6h); in process() 50 proto = ip6h->nexthdr; in process() 51 tcp = (struct tcphdr *)((void *)(ip6h) + ihl_len); in process()
|
D | test_l4lb_noinline.c | 240 struct ipv6hdr *ip6h; in parse_icmpv6() local 248 ip6h = data + off; in parse_icmpv6() 249 if (ip6h + 1 > data_end) in parse_icmpv6() 251 pckt->proto = ip6h->nexthdr; in parse_icmpv6() 253 memcpy(pckt->srcv6, ip6h->daddr.s6_addr32, 16); in parse_icmpv6() 254 memcpy(pckt->dstv6, ip6h->saddr.s6_addr32, 16); in parse_icmpv6() 337 struct ipv6hdr *ip6h; in process_packet() local 350 ip6h = data + off; in process_packet() 351 if (ip6h + 1 > data_end) in process_packet() 355 protocol = ip6h->nexthdr; in process_packet() [all …]
|
/Linux-v4.19/net/netfilter/ |
D | nf_flow_table_ip.c | 312 static int nf_flow_nat_ipv6_l4proto(struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_nat_ipv6_l4proto() argument 316 switch (ip6h->nexthdr) { in nf_flow_nat_ipv6_l4proto() 331 struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_snat_ipv6() argument 339 addr = ip6h->saddr; in nf_flow_snat_ipv6() 341 ip6h->saddr = new_addr; in nf_flow_snat_ipv6() 344 addr = ip6h->daddr; in nf_flow_snat_ipv6() 346 ip6h->daddr = new_addr; in nf_flow_snat_ipv6() 352 return nf_flow_nat_ipv6_l4proto(skb, ip6h, thoff, &addr, &new_addr); in nf_flow_snat_ipv6() 356 struct sk_buff *skb, struct ipv6hdr *ip6h, in nf_flow_dnat_ipv6() argument 364 addr = ip6h->daddr; in nf_flow_dnat_ipv6() [all …]
|
D | xt_hl.c | 50 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in hl_mt6() local 54 return ip6h->hop_limit == info->hop_limit; in hl_mt6() 56 return ip6h->hop_limit != info->hop_limit; in hl_mt6() 58 return ip6h->hop_limit < info->hop_limit; in hl_mt6() 60 return ip6h->hop_limit > info->hop_limit; in hl_mt6()
|
D | xt_HL.c | 71 struct ipv6hdr *ip6h; in hl_tg6() local 78 ip6h = ipv6_hdr(skb); in hl_tg6() 85 new_hl = ip6h->hop_limit + info->hop_limit; in hl_tg6() 90 new_hl = ip6h->hop_limit - info->hop_limit; in hl_tg6() 95 new_hl = ip6h->hop_limit; in hl_tg6() 99 ip6h->hop_limit = new_hl; in hl_tg6()
|
D | utils.c | 66 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum() local 73 if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum() 84 csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in nf_ip6_checksum() 100 const struct ipv6hdr *ip6h = ipv6_hdr(skb); in nf_ip6_checksum_partial() local 111 skb->csum = ~csum_unfold(csum_ipv6_magic(&ip6h->saddr, in nf_ip6_checksum_partial() 112 &ip6h->daddr, in nf_ip6_checksum_partial()
|
/Linux-v4.19/net/ipv6/ |
D | mcast_snoop.c | 28 const struct ipv6hdr *ip6h; in ipv6_mc_check_ip6hdr() local 30 unsigned int offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_ip6hdr() 35 ip6h = ipv6_hdr(skb); in ipv6_mc_check_ip6hdr() 37 if (ip6h->version != 6) in ipv6_mc_check_ip6hdr() 40 len = offset + ntohs(ip6h->payload_len); in ipv6_mc_check_ip6hdr() 49 const struct ipv6hdr *ip6h; in ipv6_mc_check_exthdrs() local 54 ip6h = ipv6_hdr(skb); in ipv6_mc_check_exthdrs() 56 if (ip6h->nexthdr != IPPROTO_HOPOPTS) in ipv6_mc_check_exthdrs() 59 nexthdr = ip6h->nexthdr; in ipv6_mc_check_exthdrs() 60 offset = skb_network_offset(skb) + sizeof(*ip6h); in ipv6_mc_check_exthdrs()
|
D | ip6_udp_tunnel.c | 80 struct ipv6hdr *ip6h; in udp_tunnel6_xmit_skb() local 95 __skb_push(skb, sizeof(*ip6h)); in udp_tunnel6_xmit_skb() 97 ip6h = ipv6_hdr(skb); in udp_tunnel6_xmit_skb() 98 ip6_flow_hdr(ip6h, prio, label); in udp_tunnel6_xmit_skb() 99 ip6h->payload_len = htons(skb->len); in udp_tunnel6_xmit_skb() 100 ip6h->nexthdr = IPPROTO_UDP; in udp_tunnel6_xmit_skb() 101 ip6h->hop_limit = ttl; in udp_tunnel6_xmit_skb() 102 ip6h->daddr = *daddr; in udp_tunnel6_xmit_skb() 103 ip6h->saddr = *saddr; in udp_tunnel6_xmit_skb()
|
D | xfrm6_mode_beet.c | 82 struct ipv6hdr *ip6h; in xfrm6_beet_input() local 96 ip6h = ipv6_hdr(skb); in xfrm6_beet_input() 97 ip6h->payload_len = htons(skb->len - size); in xfrm6_beet_input() 98 ip6h->daddr = x->sel.daddr.in6; in xfrm6_beet_input() 99 ip6h->saddr = x->sel.saddr.in6; in xfrm6_beet_input()
|
/Linux-v4.19/drivers/infiniband/sw/rxe/ |
D | rxe_icrc.c | 42 struct ipv6hdr *ip6h = NULL; in rxe_icrc_hdr() local 72 ip6h = (struct ipv6hdr *)pshdr; in rxe_icrc_hdr() 73 udph = (struct udphdr *)(ip6h + 1); in rxe_icrc_hdr() 75 memset(ip6h->flow_lbl, 0xff, sizeof(ip6h->flow_lbl)); in rxe_icrc_hdr() 76 ip6h->priority = 0xf; in rxe_icrc_hdr() 77 ip6h->hop_limit = 0xff; in rxe_icrc_hdr()
|
/Linux-v4.19/net/ipv6/netfilter/ |
D | nf_reject_ipv6.c | 70 struct ipv6hdr *ip6h; in nf_reject_ip6hdr_put() local 77 ip6h = ipv6_hdr(nskb); in nf_reject_ip6hdr_put() 78 ip6_flow_hdr(ip6h, tclass, 0); in nf_reject_ip6hdr_put() 79 ip6h->hop_limit = hoplimit; in nf_reject_ip6hdr_put() 80 ip6h->nexthdr = protocol; in nf_reject_ip6hdr_put() 81 ip6h->saddr = oip6h->daddr; in nf_reject_ip6hdr_put() 82 ip6h->daddr = oip6h->saddr; in nf_reject_ip6hdr_put() 86 return ip6h; in nf_reject_ip6hdr_put() 139 struct ipv6hdr *ip6h; in nf_send_reset6() local 187 ip6h = nf_reject_ip6hdr_put(nskb, oldskb, IPPROTO_TCP, in nf_send_reset6() [all …]
|
/Linux-v4.19/net/ipv6/ila/ |
D | ila_common.c | 35 static __wsum get_csum_diff(struct ipv6hdr *ip6h, struct ila_params *p) in get_csum_diff() argument 37 return get_csum_diff_iaddr(ila_a2i(&ip6h->daddr), p); in get_csum_diff() 78 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_csum_adjust_transport() local 81 switch (ip6h->nexthdr) { in ila_csum_adjust_transport() 87 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport() 98 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport() 112 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport() 123 struct ipv6hdr *ip6h = ipv6_hdr(skb); in ila_update_ipv6_locator() local 124 struct ila_addr *iaddr = ila_a2i(&ip6h->daddr); in ila_update_ipv6_locator()
|
/Linux-v4.19/drivers/net/ipvlan/ |
D | ipvlan_core.c | 177 struct ipv6hdr *ip6h; in ipvlan_get_L3_hdr() local 179 if (unlikely(!pskb_may_pull(skb, sizeof(*ip6h)))) in ipvlan_get_L3_hdr() 182 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr() 183 if (ip6h->version != 6) in ipvlan_get_L3_hdr() 187 lyr3h = ip6h; in ipvlan_get_L3_hdr() 189 if (ipv6_addr_any(&ip6h->saddr) && in ipvlan_get_L3_hdr() 190 ip6h->nexthdr == NEXTHDR_ICMP) { in ipvlan_get_L3_hdr() 193 if (unlikely(!pskb_may_pull(skb, sizeof(*ip6h) + sizeof(*icmph)))) in ipvlan_get_L3_hdr() 196 ip6h = ipv6_hdr(skb); in ipvlan_get_L3_hdr() 197 icmph = (struct icmp6hdr *)(ip6h + 1); in ipvlan_get_L3_hdr() [all …]
|
/Linux-v4.19/net/sched/ |
D | act_csum.c | 178 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_icmp() local 184 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_icmp() 187 icmp6h->icmp6_cksum = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_icmp() 224 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_tcp() local 233 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_tcp() 236 tcph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in tcf_csum_ipv6_tcp() 305 const struct ipv6hdr *ip6h; in tcf_csum_ipv6_udp() local 322 ip6h = ipv6_hdr(skb); in tcf_csum_ipv6_udp() 343 udph->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, ul, in tcf_csum_ipv6_udp() 477 struct ipv6hdr *ip6h; in tcf_csum_ipv6() local [all …]
|
/Linux-v4.19/drivers/net/ethernet/qualcomm/rmnet/ |
D | rmnet_map_data.c | 130 struct ipv6hdr *ip6h; in rmnet_map_ipv6_dl_csum_trailer() local 134 ip6h = (struct ipv6hdr *)(skb->data); in rmnet_map_ipv6_dl_csum_trailer() 137 csum_field = rmnet_map_get_csum_field(ip6h->nexthdr, txporthdr); in rmnet_map_ipv6_dl_csum_trailer() 146 ~ntohs((__force __be16)ip_compute_csum(ip6h, in rmnet_map_ipv6_dl_csum_trailer() 151 length = (ip6h->nexthdr == IPPROTO_UDP) ? in rmnet_map_ipv6_dl_csum_trailer() 153 ntohs(ip6h->payload_len); in rmnet_map_ipv6_dl_csum_trailer() 154 pseudo_csum = ~(csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in rmnet_map_ipv6_dl_csum_trailer() 155 length, ip6h->nexthdr, 0)); in rmnet_map_ipv6_dl_csum_trailer() 164 switch (ip6h->nexthdr) { in rmnet_map_ipv6_dl_csum_trailer() 234 struct ipv6hdr *ip6h = (struct ipv6hdr *)ip6hdr; in rmnet_map_complement_ipv6_txporthdr_csum_field() local [all …]
|