Home
last modified time | relevance | path

Searched refs:ip6 (Results 1 – 25 of 113) sorted by relevance

12345

/linux-6.1.9/tools/testing/selftests/net/bpf/
Dnat6to4.c55 const struct ipv6hdr * const ip6 = (void *)(eth + 1); in sched_cls_ingress6_nat_6_prog() local
66 if (data + l2_header_size + sizeof(*ip6) > data_end) in sched_cls_ingress6_nat_6_prog()
74 if (ip6->version != 6) in sched_cls_ingress6_nat_6_prog()
77 if (bpf_ntohs(ip6->payload_len) > 0xFFFF - sizeof(struct iphdr)) in sched_cls_ingress6_nat_6_prog()
79 switch (ip6->nexthdr) { in sched_cls_ingress6_nat_6_prog()
97 .tos = (ip6->priority << 4) + (ip6->flow_lbl[0] >> 4), // u8 in sched_cls_ingress6_nat_6_prog()
98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 in sched_cls_ingress6_nat_6_prog()
101 .ttl = ip6->hop_limit, // u8 in sched_cls_ingress6_nat_6_prog()
102 .protocol = ip6->nexthdr, // u8 in sched_cls_ingress6_nat_6_prog()
122 for (int i = 0; i < sizeof(*ip6) / sizeof(__u16); ++i) in sched_cls_ingress6_nat_6_prog()
[all …]
/linux-6.1.9/include/linux/netfilter/ipset/
Dpfxlen.h22 return &ip_set_netmask_map[pfxlen].ip6[0]; in ip_set_netmask6()
34 return &ip_set_hostmask_map[pfxlen].ip6[0]; in ip_set_hostmask6()
48 ip->ip6[0] &= ip_set_netmask6(prefix)[0]; in ip6_netmask()
49 ip->ip6[1] &= ip_set_netmask6(prefix)[1]; in ip6_netmask()
50 ip->ip6[2] &= ip_set_netmask6(prefix)[2]; in ip6_netmask()
51 ip->ip6[3] &= ip_set_netmask6(prefix)[3]; in ip6_netmask()
/linux-6.1.9/net/netfilter/
Dxt_NETMAP.c29 for (i = 0; i < ARRAY_SIZE(range->min_addr.ip6); i++) in netmap_tg6()
30 netmask.ip6[i] = ~(range->min_addr.ip6[i] ^ in netmap_tg6()
31 range->max_addr.ip6[i]); in netmap_tg6()
39 for (i = 0; i < ARRAY_SIZE(new_addr.ip6); i++) { in netmap_tg6()
40 new_addr.ip6[i] &= ~netmask.ip6[i]; in netmap_tg6()
41 new_addr.ip6[i] |= range->min_addr.ip6[i] & in netmap_tg6()
42 netmask.ip6[i]; in netmap_tg6()
Dxt_HMARK.c92 t->src = hmark_addr_mask(otuple->src.l3num, otuple->src.u3.ip6, in hmark_ct_set_htuple()
93 info->src_mask.ip6); in hmark_ct_set_htuple()
94 t->dst = hmark_addr_mask(otuple->src.l3num, rtuple->src.u3.ip6, in hmark_ct_set_htuple()
95 info->dst_mask.ip6); in hmark_ct_set_htuple()
168 struct ipv6hdr *ip6, _ip6; in hmark_pkt_set_htuple_ipv6() local
174 ip6 = (struct ipv6hdr *) (skb->data + skb_network_offset(skb)); in hmark_pkt_set_htuple_ipv6()
183 ip6 = skb_header_pointer(skb, nhoff, sizeof(_ip6), &_ip6); in hmark_pkt_set_htuple_ipv6()
184 if (ip6 == NULL) in hmark_pkt_set_htuple_ipv6()
193 t->src = hmark_addr6_mask(ip6->saddr.s6_addr32, info->src_mask.ip6); in hmark_pkt_set_htuple_ipv6()
194 t->dst = hmark_addr6_mask(ip6->daddr.s6_addr32, info->dst_mask.ip6); in hmark_pkt_set_htuple_ipv6()
Dxt_connlimit.c56 memcpy(&addr.ip6, (info->flags & XT_CONNLIMIT_DADDR) ? in connlimit_mt()
57 &iph->daddr : &iph->saddr, sizeof(addr.ip6)); in connlimit_mt()
59 for (i = 0; i < ARRAY_SIZE(addr.ip6); ++i) in connlimit_mt()
60 addr.ip6[i] &= info->mask.ip6[i]; in connlimit_mt()
61 memcpy(key, &addr, sizeof(addr.ip6)); in connlimit_mt()
Dnft_nat.c45 memcpy(range->min_addr.ip6, &regs->data[priv->sreg_addr_min], in nft_nat_setup_addr()
46 sizeof(range->min_addr.ip6)); in nft_nat_setup_addr()
47 memcpy(range->max_addr.ip6, &regs->data[priv->sreg_addr_max], in nft_nat_setup_addr()
48 sizeof(range->max_addr.ip6)); in nft_nat_setup_addr()
94 netmask = ~(range->min_addr.ip6[i] ^ range->max_addr.ip6[i]); in nft_nat_setup_netmap()
95 new_addr.ip6[i] &= ~netmask; in nft_nat_setup_netmap()
96 new_addr.ip6[i] |= range->min_addr.ip6[i] & netmask; in nft_nat_setup_netmap()
201 alen = sizeof_field(struct nf_nat_range, min_addr.ip6); in nft_nat_init()
Dnft_flow_offload.c243 fl.u.ip6.daddr = ct->tuplehash[dir].tuple.src.u3.in6; in nft_flow_route()
244 fl.u.ip6.saddr = ct->tuplehash[!dir].tuple.src.u3.in6; in nft_flow_route()
245 fl.u.ip6.flowi6_oif = nft_in(pkt)->ifindex; in nft_flow_route()
246 fl.u.ip6.flowi6_iif = this_dst->dev->ifindex; in nft_flow_route()
247 fl.u.ip6.flowlabel = ip6_flowinfo(ipv6_hdr(pkt->skb)); in nft_flow_route()
248 fl.u.ip6.flowi6_mark = pkt->skb->mark; in nft_flow_route()
249 fl.u.ip6.flowi6_flags = FLOWI_FLAG_ANYSRC; in nft_flow_route()
Dnf_conntrack_proto_icmpv6.c175 memcpy(&outer_daddr.ip6, &ipv6_hdr(skb)->daddr, in nf_conntrack_icmpv6_redirect()
176 sizeof(outer_daddr.ip6)); in nf_conntrack_icmpv6_redirect()
219 memcpy(&outer_daddr.ip6, &ipv6_hdr(skb)->daddr, in nf_conntrack_icmpv6_error()
220 sizeof(outer_daddr.ip6)); in nf_conntrack_icmpv6_error()
/linux-6.1.9/drivers/net/wireguard/selftest/
Dallowedips.c130 node->ip.ip6[0] &= node->mask.ip6[0]; in horrible_mask_self()
131 node->ip.ip6[1] &= node->mask.ip6[1]; in horrible_mask_self()
132 node->ip.ip6[2] &= node->mask.ip6[2]; in horrible_mask_self()
133 node->ip.ip6[3] &= node->mask.ip6[3]; in horrible_mask_self()
146 return (ip->in6_u.u6_addr32[0] & node->mask.ip6[0]) == node->ip.ip6[0] && in horrible_match_v6()
147 (ip->in6_u.u6_addr32[1] & node->mask.ip6[1]) == node->ip.ip6[1] && in horrible_match_v6()
148 (ip->in6_u.u6_addr32[2] & node->mask.ip6[2]) == node->ip.ip6[2] && in horrible_match_v6()
149 (ip->in6_u.u6_addr32[3] & node->mask.ip6[3]) == node->ip.ip6[3]; in horrible_match_v6()
437 static __init inline struct in6_addr *ip6(u32 a, u32 b, u32 c, u32 d) in ip6() function
624 !memcmp(ip, ip6(0x26075300, 0x60006b00, 0, 0xc05f0543), in wg_allowedips_selftest()
[all …]
/linux-6.1.9/tools/testing/selftests/bpf/progs/
Dfexit_bpf2bpf.c121 struct ipv6hdr ip6, *ip6p; in new_get_skb_ifindex() local
127 if (data + 14 + sizeof(ip6) > data_end) in new_get_skb_ifindex()
135 if (bpf_skb_load_bytes(skb, 14, &ip6, sizeof(ip6)) < 0) in new_get_skb_ifindex()
137 ip6p = &ip6; in new_get_skb_ifindex()
Dtest_misc_tcp_hdr_options.c36 struct ipv6hdr ip6; in __check_active_hdr_in() member
97 ret = bpf_getsockopt(skops, SOL_TCP, TCP_BPF_SYN_IP, &hdr.ip6, in __check_active_hdr_in()
98 sizeof(hdr.ip6)); in __check_active_hdr_in()
102 if (hdr.ip6.saddr.s6_addr16[7] != last_addr16_n || in __check_active_hdr_in()
103 hdr.ip6.daddr.s6_addr16[7] != last_addr16_n) in __check_active_hdr_in()
110 pth = (struct tcphdr *)(&hdr.ip6 + 1); in __check_active_hdr_in()
/linux-6.1.9/drivers/net/ethernet/chelsio/libcxgb/
Dlibcxgb_cm.c53 struct ipv6hdr *ip6 = (struct ipv6hdr *)((u8 *)(req + 1) + eth_len); in cxgb_get_4tuple() local
66 __func__, ip6->saddr.s6_addr, ip6->daddr.s6_addr, in cxgb_get_4tuple()
69 memcpy(peer_ip, ip6->saddr.s6_addr, 16); in cxgb_get_4tuple()
70 memcpy(local_ip, ip6->daddr.s6_addr, 16); in cxgb_get_4tuple()
/linux-6.1.9/net/ipv6/
Dexthdrs_core.c197 struct ipv6hdr _ip6, *ip6; in ipv6_find_hdr() local
199 ip6 = skb_header_pointer(skb, *offset, sizeof(_ip6), &_ip6); in ipv6_find_hdr()
200 if (!ip6 || (ip6->version != 6)) in ipv6_find_hdr()
203 nexthdr = ip6->nexthdr; in ipv6_find_hdr()
Dxfrm6_protocol.c69 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_rcv_encap()
114 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_esp_rcv()
143 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_ah_rcv()
172 XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 = NULL; in xfrm6_ipcomp_rcv()
/linux-6.1.9/net/tipc/
Dudp_media.c441 struct sockaddr_in6 ip6; in __tipc_nl_add_udp_addr() local
443 memset(&ip6, 0, sizeof(ip6)); in __tipc_nl_add_udp_addr()
444 ip6.sin6_family = AF_INET6; in __tipc_nl_add_udp_addr()
445 ip6.sin6_port = addr->port; in __tipc_nl_add_udp_addr()
446 memcpy(&ip6.sin6_addr, &addr->ipv6, sizeof(struct in6_addr)); in __tipc_nl_add_udp_addr()
447 if (nla_put(skb, nla_t, sizeof(ip6), &ip6)) in __tipc_nl_add_udp_addr()
598 struct sockaddr_in6 *ip6 = (struct sockaddr_in6 *)&sa; in tipc_parse_udp_addr() local
601 addr->port = ip6->sin6_port; in tipc_parse_udp_addr()
602 memcpy(&addr->ipv6, &ip6->sin6_addr, sizeof(struct in6_addr)); in tipc_parse_udp_addr()
608 atype = ipv6_addr_type(&ip6->sin6_addr); in tipc_parse_udp_addr()
[all …]
/linux-6.1.9/net/netfilter/ipvs/
Dip_vs_dh.c77 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_dh_hashkey()
78 addr->ip6[2]^addr->ip6[3]; in ip_vs_dh_hashkey()
Dip_vs_sh.c91 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_sh_hashkey()
92 addr->ip6[2]^addr->ip6[3]; in ip_vs_sh_hashkey()
Dip_vs_mh.c97 addr_fold = addr->ip6[0] ^ addr->ip6[1] ^ in ip_vs_mh_hashkey()
98 addr->ip6[2] ^ addr->ip6[3]; in ip_vs_mh_hashkey()
Dip_vs_lblc.c156 addr_fold = addr->ip6[0]^addr->ip6[1]^ in ip_vs_lblc_hashkey()
157 addr->ip6[2]^addr->ip6[3]; in ip_vs_lblc_hashkey()
/linux-6.1.9/security/
Dlsm_audit.c103 struct ipv6hdr *ip6; in ipv6_skb_to_auditdata() local
107 ip6 = ipv6_hdr(skb); in ipv6_skb_to_auditdata()
108 ad->u.net->v6info.saddr = ip6->saddr; in ipv6_skb_to_auditdata()
109 ad->u.net->v6info.daddr = ip6->daddr; in ipv6_skb_to_auditdata()
113 offset += sizeof(*ip6); in ipv6_skb_to_auditdata()
114 nexthdr = ip6->nexthdr; in ipv6_skb_to_auditdata()
/linux-6.1.9/tools/testing/selftests/netfilter/
Drpath.sh74 ip6 saddr fec0::/16 fib saddr . iif oif exists counter
124 nft_zero_rule ip6 || die "nft IPv6 matched martian"
135 nft_zero_rule ip6 && die "nft IPv6 match not effective"
/linux-6.1.9/net/netfilter/ipset/
Dpfxlen.c143 {.ip6 = { \
158 {.ip6 = { (__force __be32)a, (__force __be32)b, \
/linux-6.1.9/net/bridge/
Dbr_mdb.c163 ip->dst.ip6 = entry->addr.u.ip6; in __mdb_entry_to_br_ip()
165 ip->src.ip6 = nla_get_in6_addr(mdb_attrs[MDBE_ATTR_SOURCE]); in __mdb_entry_to_br_ip()
203 &ent->addr.src.ip6)) { in __mdb_fill_srcs()
258 e.addr.u.ip6 = mp->addr.dst.ip6; in __mdb_fill_info()
289 if (!ipv6_addr_any(&mp->addr.src.ip6)) { in __mdb_fill_info()
291 &mp->addr.src.ip6)) in __mdb_fill_info()
529 if (!ipv6_addr_any(&pg->key.addr.src.ip6)) in rtnl_mdb_nlmsg_size()
685 if (ipv6_addr_is_ll_all_nodes(&entry->addr.u.ip6)) { in is_valid_mdb_entry()
/linux-6.1.9/drivers/infiniband/ulp/srp/
Dib_srp.h246 struct sockaddr_in6 ip6; member
252 struct sockaddr_in6 ip6; member
/linux-6.1.9/drivers/net/ipvlan/
Dipvlan.h78 struct in6_addr ip6; /* IPv6 address on logical interface */ member
81 #define ip6addr ipu.ip6

12345