Home
last modified time | relevance | path

Searched refs:tuplehash (Results 1 – 25 of 45) sorted by relevance

12

/linux/net/netfilter/
H A Dnf_flow_table_ip.c92 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v4.s_addr; in nf_flow_snat_ip()
97 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v4.s_addr; in nf_flow_snat_ip()
115 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.src_v4.s_addr; in nf_flow_dnat_ip()
120 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_v4.s_addr; in nf_flow_dnat_ip()
435 struct flow_offload_tuple_rhash *tuplehash) in nf_flow_offload_ip_hook()
440 for (i = 0; i < tuplehash->tuple.encap_num; i++) { in nf_flow_offload_ip_hook()
499 struct flow_offload_tuple_rhash *tuplehash, in nf_flow_nat_ipv6_udp()
507 dir = tuplehash->tuple.dir; in nf_flow_nat_ipv6_l4proto()
508 flow = container_of(tuplehash, struct flow_offload, tuplehash[di in nf_flow_nat_ipv6_l4proto()
310 nf_flow_encap_pop(struct sk_buff * skb,struct flow_offload_tuple_rhash * tuplehash) nf_flow_encap_pop() argument
337 nf_flow_queue_xmit(struct net * net,struct sk_buff * skb,const struct flow_offload_tuple_rhash * tuplehash,unsigned short type) nf_flow_queue_xmit() argument
372 nf_flow_offload_forward(struct nf_flowtable_ctx * ctx,struct nf_flowtable * flow_table,struct flow_offload_tuple_rhash * tuplehash,struct sk_buff * skb) nf_flow_offload_forward() argument
421 struct flow_offload_tuple_rhash *tuplehash; nf_flow_offload_ip_hook() local
651 nf_flow_offload_ipv6_forward(struct nf_flowtable_ctx * ctx,struct nf_flowtable * flow_table,struct flow_offload_tuple_rhash * tuplehash,struct sk_buff * skb) nf_flow_offload_ipv6_forward() argument
716 struct flow_offload_tuple_rhash *tuplehash; nf_flow_offload_ipv6_hook() local
[all...]
H A Dnf_flow_table_bpf.c39 struct flow_offload_tuple_rhash *tuplehash; in bpf_xdp_flow_tuple_lookup() local
47 tuplehash = flow_offload_lookup(nf_flow_table, tuple); in bpf_xdp_flow_tuple_lookup()
48 if (!tuplehash) in bpf_xdp_flow_tuple_lookup()
51 nf_flow = container_of(tuplehash, struct flow_offload, in bpf_xdp_flow_tuple_lookup()
52 tuplehash[tuplehash->tuple.dir]); in bpf_xdp_flow_tuple_lookup()
55 return tuplehash; in bpf_xdp_flow_tuple_lookup()
70 struct flow_offload_tuple_rhash *tuplehash; in bpf_xdp_flow_lookup() local
94 tuplehash = bpf_xdp_flow_tuple_lookup(xdp->rxq->dev, &tuple, proto); in bpf_xdp_flow_lookup()
95 if (IS_ERR(tuplehash)) { in bpf_xdp_flow_lookup()
[all...]
H A Dnf_flow_table_core.c25 struct flow_offload_tuple *ft = &flow->tuplehash[dir].tuple; in flow_offload_fill_dir()
26 struct nf_conntrack_tuple *ctt = &flow->ct->tuplehash[dir].tuple; in flow_offload_fill_dir()
101 struct flow_offload_tuple *flow_tuple = &flow->tuplehash[dir].tuple; in flow_offload_fill_route()
154 if (flow->tuplehash[dir].tuple.xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
155 flow->tuplehash[dir].tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM) in flow_offload_route_init()
156 dst_release(flow->tuplehash[dir].tuple.dst_cache); in flow_offload_route_init()
279 const struct flow_offload_tuple_rhash *tuplehash = data;
281 return jhash(&tuplehash->tuple, offsetof(struct flow_offload_tuple, __hash), seed); in flow_offload_hash_cmp()
330 &flow->tuplehash[0].node, in flow_offload_add()
336 &flow->tuplehash[ in flow_offload_add()
275 const struct flow_offload_tuple_rhash *tuplehash = data; flow_offload_hash_obj() local
395 struct flow_offload_tuple_rhash *tuplehash; flow_offload_lookup() local
422 struct flow_offload_tuple_rhash *tuplehash; nf_flow_table_iterate() local
[all...]
H A Dnf_nat_sip.c107 if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, addr) && in map_addr()
108 ct->tuplehash[dir].tuple.src.u.udp.port == port) { in map_addr()
109 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in map_addr()
110 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr()
111 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr()
112 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr()
113 newaddr = ct->tuplehash[!dir].tuple.src.u3; in map_addr()
115 ct->tuplehash[!dir].tuple.src.u.udp.port; in map_addr()
189 &ct->tuplehash[dir].tuple.src.u3) || in nf_nat_sip()
190 port != ct->tuplehash[dir].tuple.src.u.udp.port) in nf_nat_sip()
[all …]
H A Dnf_conntrack_h323_main.c223 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_rtp_rtcp()
235 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp()
236 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp()
245 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp()
246 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp()
250 if (memcmp(&ct->tuplehash[dir].tuple.src.u3, in expect_rtp_rtcp()
251 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp()
252 sizeof(ct->tuplehash[dir].tuple.src.u3)) && in expect_rtp_rtcp()
296 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_t120()
304 &ct->tuplehash[!dir].tuple.src.u3, in expect_t120()
[all …]
H A Dnf_nat_proto.c384 nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple); in nf_nat_manip_pkt()
560 &ct->tuplehash[!dir].tuple, !manip)) in nf_nat_icmp_reply_translation()
573 nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple); in nf_nat_icmp_reply_translation()
680 return ct->tuplehash[!dir].tuple.dst.u.all != sport; in nf_nat_inet_port_was_mangled()
735 if (ct->tuplehash[dir].tuple.src.u3.ip != in nf_nat_ipv4_out()
736 ct->tuplehash[!dir].tuple.dst.u3.ip || in nf_nat_ipv4_out()
737 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMP && in nf_nat_ipv4_out()
738 ct->tuplehash[dir].tuple.src.u.all != in nf_nat_ipv4_out()
739 ct->tuplehash[!dir].tuple.dst.u.all)) { in nf_nat_ipv4_out()
766 if (ct->tuplehash[di in nf_nat_ipv4_local_fn()
[all...]
H A Dnf_flow_table_offload.c237 this_tuple = &flow->tuplehash[dir].tuple; in flow_offload_eth_src()
244 other_tuple = &flow->tuplehash[!dir].tuple; in flow_offload_eth_src()
287 this_tuple = &flow->tuplehash[dir].tuple; in flow_offload_eth_dst()
294 other_tuple = &flow->tuplehash[!dir].tuple; in flow_offload_eth_dst()
340 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v4.s_addr; in flow_offload_ipv4_snat()
344 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v4.s_addr; in flow_offload_ipv4_snat()
367 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.src_v4.s_addr; in flow_offload_ipv4_dnat()
371 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_v4.s_addr; in flow_offload_ipv4_dnat()
407 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v6.s6_addr32; in flow_offload_ipv6_snat()
411 addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v6.s6_addr32; in flow_offload_ipv6_snat()
[all …]
H A Dxt_conntrack.c44 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3, in conntrack_mt_origsrc()
53 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3, in conntrack_mt_origdst()
62 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3, in conntrack_mt_replsrc()
71 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3, in conntrack_mt_repldst()
81 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check()
98 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check()
125 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check_v3()
144 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check_v3()
H A Dnf_conntrack_core.c494 d = (unsigned long)siphash(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, in nf_ct_get_id()
495 sizeof(ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple), in nf_ct_get_id()
513 hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); in clean_from_lists()
514 hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode); in clean_from_lists()
611 &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, in __nf_ct_delete_from_lists()
614 &ct->tuplehash[IP_CT_DIR_REPLY].tuple, in __nf_ct_delete_from_lists()
638 hlist_nulls_add_head_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode, in nf_ct_add_to_ecache_list()
705 return nf_ct_tuple_equal(&ct1->tuplehash[IP_CT_DIR_ORIGINAL].tuple, in nf_ct_match()
706 &ct2->tuplehash[IP_CT_DIR_ORIGINAL].tuple) && in nf_ct_match()
707 nf_ct_tuple_equal(&ct1->tuplehash[IP_CT_DIR_REPLY].tuple, in nf_ct_match()
[all …]
H A Dnf_conntrack_tftp.c62 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in tftp_help()
63 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); in tftp_help()
70 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in tftp_help()
H A Dnf_conntrack_proto_icmp.c89 if (ct->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new) || in nf_conntrack_icmp_packet()
90 !valid_new[ct->tuplehash[0].tuple.dst.u.icmp.type]) { in nf_conntrack_icmp_packet()
93 ct->tuplehash[0].tuple.dst.u.icmp.type); in nf_conntrack_icmp_packet()
94 nf_ct_dump_tuple_ip(&ct->tuplehash[0].tuple); in nf_conntrack_icmp_packet()
170 ct_daddr = &ct->tuplehash[dir].tuple.dst.u3; in nf_conntrack_inet_error()
H A Dnf_conntrack_ftp.c442 memcpy(cmd.u3.all, &ct->tuplehash[dir].tuple.src.u3.all, in help()
484 daddr = &ct->tuplehash[!dir].tuple.dst.u3; in help()
488 memcmp(&cmd.u3.all, &ct->tuplehash[dir].tuple.src.u3.all, in help()
497 &ct->tuplehash[dir].tuple.src.u3.ip); in help()
501 ct->tuplehash[dir].tuple.src.u3.ip6); in help()
516 &ct->tuplehash[!dir].tuple.src.u3, daddr, in help()
H A Dnf_conntrack_pptp.c170 memcpy(&t, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, sizeof(t)); in pptp_destroy_siblings()
178 memcpy(&t, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, sizeof(t)); in pptp_destroy_siblings()
206 &ct->tuplehash[dir].tuple.src.u3, in exp_gre()
207 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre()
215 &ct->tuplehash[dir].tuple.src.u3, in exp_gre()
216 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre()
H A Dnf_nat_core.c64 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv4_decode_session()
95 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv6_decode_session()
301 if (nf_ct_tuple_equal(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, in nf_nat_used_tuple_new()
302 &ignored_ct->tuplehash[IP_CT_DIR_REPLY].tuple)) in nf_nat_used_tuple_new()
458 t = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in same_src()
481 &ct->tuplehash[IP_CT_DIR_REPLY].tuple); in find_appropriate_src()
794 &ct->tuplehash[IP_CT_DIR_REPLY].tuple); in nf_nat_setup_info()
821 &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in nf_nat_setup_info()
848 ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3 : in __nf_nat_alloc_null_binding()
849 ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3); in __nf_nat_alloc_null_binding()
[all …]
H A Dnf_flow_table_path.c51 const void *daddr = &ct->tuplehash[!dir].tuple.src.u3; in nft_dev_fill_forward_path()
295 fl.u.ip4.daddr = ct->tuplehash[dir].tuple.src.u3.ip; in nft_flow_route()
296 fl.u.ip4.saddr = ct->tuplehash[!dir].tuple.src.u3.ip; in nft_flow_route()
304 fl.u.ip6.daddr = ct->tuplehash[dir].tuple.src.u3.in6; in nft_flow_route()
305 fl.u.ip6.saddr = ct->tuplehash[!dir].tuple.src.u3.in6; in nft_flow_route()
H A Dnf_conntrack_irc.c219 tuple = &ct->tuplehash[dir].tuple; in help()
221 ct->tuplehash[!dir].tuple.dst.u3.ip != dcc_ip) || in help()
236 tuple = &ct->tuplehash[!dir].tuple; in help()
H A Dxt_cluster.c18 return (__force u32)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in nf_ct_orig_ipv4_src()
23 return (__force u32 *)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6; in nf_ct_orig_ipv6_src()
H A Dnf_nat_helper.c190 = ct->master->tuplehash[!exp->dir].tuple.dst.u3; in nf_nat_follow_master()
197 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in nf_nat_follow_master()
/linux/net/ipv4/netfilter/
H A Dnf_nat_h323.c105 if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_sig_addr()
118 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_sig_addr()
122 &ct->tuplehash[!dir]. in set_sig_addr()
125 } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && in set_sig_addr()
130 &ct->tuplehash[!dir].tuple.src.u3.ip, in set_sig_addr()
134 &ct->tuplehash[!dir]. in set_sig_addr()
157 addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_ras_addr()
158 port == ct->tuplehash[dir].tuple.src.u.udp.port) { in set_ras_addr()
161 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_ras_addr()
162 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr()
[all …]
H A Dnf_nat_pptp.c67 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected()
69 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected()
76 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected()
78 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected()
100 = ct->master->tuplehash[!exp->dir].tuple.dst.u3; in pptp_nat_expected()
110 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in pptp_nat_expected()
156 new_callid = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.tcp.port; in pptp_outbound_pkt()
H A Dnf_nat_snmp_basic_main.c136 ctx.from = ct->tuplehash[dir].tuple.src.u3.ip; in snmp_translate()
137 ctx.to = ct->tuplehash[!dir].tuple.dst.u3.ip; in snmp_translate()
139 ctx.from = ct->tuplehash[!dir].tuple.src.u3.ip; in snmp_translate()
140 ctx.to = ct->tuplehash[dir].tuple.dst.u3.ip; in snmp_translate()
/linux/include/net/netfilter/
H A Dnf_conntrack.h96 struct nf_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];
137 tuplehash[hash->tuple.dst.dir]); in nf_ct_tuplehash_to_ctrack()
142 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; in nf_ct_l3num()
147 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum; in nf_ct_protonum()
150 #define nf_ct_tuple(ct, dir) (&(ct)->tuplehash[dir].tuple)
287 ct->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply; in nf_conntrack_alter_reply()
95 struct nf_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; global() member
/linux/net/netfilter/ipvs/
H A Dip_vs_nfct.c103 new_tuple = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_update_conntrack()
121 ARG_TUPLE(&ct->tuplehash[IP_CT_DIR_REPLY].tuple)); in ip_vs_update_conntrack()
156 orig = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ip_vs_nfct_expect_callback()
166 new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_nfct_expect_callback()
182 new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_nfct_expect_callback()
/linux/tools/testing/selftests/bpf/progs/
H A Dxdp_flowtable.c70 struct flow_offload_tuple_rhash *tuplehash; in xdp_flowtable_do_lookup() local
137 tuplehash = bpf_xdp_flow_lookup(ctx, &tuple, &opts, sizeof(opts)); in xdp_flowtable_do_lookup()
138 if (!tuplehash) in xdp_flowtable_do_lookup()
/linux/net/sched/
H A Dact_ct.c209 const struct nf_conntrack_tuple *tuple = &ct->tuplehash[dir].tuple; in tcf_ct_flow_table_add_action_nat()
215 nf_ct_invert_tuple(&target, &ct->tuplehash[!dir].tuple); in tcf_ct_flow_table_add_action_nat()
405 entry->tuplehash[dir].tuple.xmit_type = FLOW_OFFLOAD_XMIT_TC; in tcf_ct_flow_tc_ifidx()
406 entry->tuplehash[dir].tuple.tc.iifidx = act_ct_ext->ifindex[dir]; in tcf_ct_flow_tc_ifidx()
494 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in tcf_ct_flow_table_process_conn()
659 struct flow_offload_tuple_rhash *tuplehash; in tcf_ct_flow_table_lookup() local
681 tuplehash = flow_offload_lookup(nf_ft, &tuple); in tcf_ct_flow_table_lookup()
682 if (!tuplehash) in tcf_ct_flow_table_lookup()
685 dir = tuplehash->tuple.dir; in tcf_ct_flow_table_lookup()
686 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); in tcf_ct_flow_table_lookup()

12