/Linux-v4.19/net/netfilter/ |
D | nf_flow_table_core.c | 29 struct flow_offload_tuple *ft = &flow->tuplehash[dir].tuple; in flow_offload_fill_dir() 30 struct nf_conntrack_tuple *ctt = &ct->tuplehash[dir].tuple; in flow_offload_fill_dir() 141 dst_release(flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_cache); in flow_offload_free() 142 dst_release(flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_cache); in flow_offload_free() 160 const struct flow_offload_tuple_rhash *tuplehash = data; in flow_offload_hash_obj() local 162 return jhash(&tuplehash->tuple, offsetof(struct flow_offload_tuple, dir), seed); in flow_offload_hash_obj() 190 &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].node, in flow_offload_add() 193 &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].node, in flow_offload_add() 205 &flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].node, in flow_offload_del() 208 &flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].node, in flow_offload_del() [all …]
|
D | nf_flow_table_ip.c | 100 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.dst_v4.s_addr; in nf_flow_snat_ip() 105 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.src_v4.s_addr; in nf_flow_snat_ip() 125 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple.src_v4.s_addr; in nf_flow_dnat_ip() 130 new_addr = flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple.dst_v4.s_addr; in nf_flow_dnat_ip() 217 struct flow_offload_tuple_rhash *tuplehash; in nf_flow_offload_ip_hook() local 234 tuplehash = flow_offload_lookup(flow_table, &tuple); in nf_flow_offload_ip_hook() 235 if (tuplehash == NULL) in nf_flow_offload_ip_hook() 238 outdev = dev_get_by_index_rcu(state->net, tuplehash->tuple.oifidx); in nf_flow_offload_ip_hook() 242 dir = tuplehash->tuple.dir; in nf_flow_offload_ip_hook() 243 flow = container_of(tuplehash, struct flow_offload, tuplehash[dir]); in nf_flow_offload_ip_hook() [all …]
|
D | nf_nat_sip.c | 105 if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, addr) && in map_addr() 106 ct->tuplehash[dir].tuple.src.u.udp.port == port) { in map_addr() 107 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in map_addr() 108 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr() 109 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr() 110 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr() 111 newaddr = ct->tuplehash[!dir].tuple.src.u3; in map_addr() 113 ct->tuplehash[!dir].tuple.src.u.udp.port; in map_addr() 187 &ct->tuplehash[dir].tuple.src.u3) || in nf_nat_sip() 188 port != ct->tuplehash[dir].tuple.src.u.udp.port) in nf_nat_sip() [all …]
|
D | nf_conntrack_h323_main.c | 273 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_rtp_rtcp() 285 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp() 286 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp() 295 &ct->tuplehash[!dir].tuple.src.u3, in expect_rtp_rtcp() 296 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp() 299 if (memcmp(&ct->tuplehash[dir].tuple.src.u3, in expect_rtp_rtcp() 300 &ct->tuplehash[!dir].tuple.dst.u3, in expect_rtp_rtcp() 301 sizeof(ct->tuplehash[dir].tuple.src.u3)) && in expect_rtp_rtcp() 345 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_t120() 353 &ct->tuplehash[!dir].tuple.src.u3, in expect_t120() [all …]
|
D | xt_conntrack.c | 47 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3, in conntrack_mt_origsrc() 56 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3, in conntrack_mt_origdst() 65 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3, in conntrack_mt_replsrc() 74 return conntrack_addrcmp(&ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3, in conntrack_mt_repldst() 84 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check() 101 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check() 128 tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ct_proto_port_check_v3() 147 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ct_proto_port_check_v3()
|
D | nf_conntrack_core.c | 431 hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); in clean_from_lists() 432 hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode); in clean_from_lists() 448 hlist_nulls_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode, in nf_ct_add_to_dying_list() 463 hlist_nulls_add_head(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode, in nf_ct_add_to_unconfirmed_list() 477 BUG_ON(hlist_nulls_unhashed(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode)); in nf_ct_del_from_dying_or_unconfirmed_list() 478 hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode); in nf_ct_del_from_dying_or_unconfirmed_list() 577 &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in nf_ct_delete_from_lists() 579 &ct->tuplehash[IP_CT_DIR_REPLY].tuple); in nf_ct_delete_from_lists() 638 return nf_ct_tuple_equal(&ct1->tuplehash[IP_CT_DIR_ORIGINAL].tuple, in nf_ct_match() 639 &ct2->tuplehash[IP_CT_DIR_ORIGINAL].tuple) && in nf_ct_match() [all …]
|
D | nf_conntrack_tftp.c | 61 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in tftp_help() 62 nf_ct_dump_tuple(&ct->tuplehash[IP_CT_DIR_REPLY].tuple); in tftp_help() 69 tuple = &ct->tuplehash[IP_CT_DIR_REPLY].tuple; in tftp_help()
|
D | nf_conntrack_ftp.c | 444 memcpy(cmd.u3.all, &ct->tuplehash[dir].tuple.src.u3.all, in help() 486 daddr = &ct->tuplehash[!dir].tuple.dst.u3; in help() 490 memcmp(&cmd.u3.all, &ct->tuplehash[dir].tuple.src.u3.all, in help() 499 &ct->tuplehash[dir].tuple.src.u3.ip); in help() 503 ct->tuplehash[dir].tuple.src.u3.ip6); in help() 518 &ct->tuplehash[!dir].tuple.src.u3, daddr, in help()
|
D | nft_flow_offload.c | 32 fl.u.ip4.daddr = ct->tuplehash[!dir].tuple.dst.u3.ip; in nft_flow_route() 35 fl.u.ip6.daddr = ct->tuplehash[!dir].tuple.dst.u3.in6; in nft_flow_route() 83 switch (ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum) { in nft_flow_offload_eval()
|
D | nf_conntrack_pptp.c | 183 memcpy(&t, &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple, sizeof(t)); in pptp_destroy_siblings() 191 memcpy(&t, &ct->tuplehash[IP_CT_DIR_REPLY].tuple, sizeof(t)); in pptp_destroy_siblings() 219 &ct->tuplehash[dir].tuple.src.u3, in exp_gre() 220 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre() 228 &ct->tuplehash[dir].tuple.src.u3, in exp_gre() 229 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre()
|
D | nf_conntrack_proto_icmp.c | 110 if (ct->tuplehash[0].tuple.dst.u.icmp.type >= sizeof(valid_new) || in icmp_new() 111 !valid_new[ct->tuplehash[0].tuple.dst.u.icmp.type]) { in icmp_new() 114 ct->tuplehash[0].tuple.dst.u.icmp.type); in icmp_new() 115 nf_ct_dump_tuple_ip(&ct->tuplehash[0].tuple); in icmp_new()
|
D | xt_cluster.c | 21 return (__force u32)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in nf_ct_orig_ipv4_src() 26 return (__force u32 *)ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip6; in nf_ct_orig_ipv6_src()
|
D | nf_nat_core.c | 204 t = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in same_src() 229 &ct->tuplehash[IP_CT_DIR_REPLY].tuple); in find_appropriate_src() 428 &ct->tuplehash[IP_CT_DIR_REPLY].tuple); in nf_nat_setup_info() 455 &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in nf_nat_setup_info() 482 ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u3 : in __nf_nat_alloc_null_binding() 483 ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.u3); in __nf_nat_alloc_null_binding() 508 nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); in nf_nat_manip_pkt() 643 h = hash_by_src(nf_ct_net(ct), &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple); in __nf_nat_cleanup_conntrack()
|
D | nf_nat_helper.c | 202 = ct->master->tuplehash[!exp->dir].tuple.dst.u3; in nf_nat_follow_master() 209 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in nf_nat_follow_master()
|
D | nf_nat_tftp.c | 28 = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port; in help()
|
D | nf_conntrack_irc.c | 189 tuple = &ct->tuplehash[dir].tuple; in help() 205 tuple = &ct->tuplehash[!dir].tuple; in help()
|
D | nf_conntrack_broadcast.c | 59 exp->tuple = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in nf_conntrack_broadcast_help()
|
/Linux-v4.19/net/ipv4/netfilter/ |
D | nf_nat_h323.c | 106 if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_sig_addr() 119 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_sig_addr() 123 &ct->tuplehash[!dir]. in set_sig_addr() 126 } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && in set_sig_addr() 131 &ct->tuplehash[!dir].tuple.src.u3.ip, in set_sig_addr() 135 &ct->tuplehash[!dir]. in set_sig_addr() 158 addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_ras_addr() 159 port == ct->tuplehash[dir].tuple.src.u.udp.port) { in set_ras_addr() 162 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_ras_addr() 163 ntohs(ct->tuplehash[!dir].tuple.dst.u.udp.port)); in set_ras_addr() [all …]
|
D | nf_nat_l3proto_ipv4.c | 38 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv4_decode_session() 222 l4proto, &ct->tuplehash[!dir].tuple, !manip)) in nf_nat_icmp_reply_translation() 235 nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); in nf_nat_icmp_reply_translation() 302 if ((ct->tuplehash[dir].tuple.src.u3.ip != in nf_nat_ipv4_out() 303 ct->tuplehash[!dir].tuple.dst.u3.ip) || in nf_nat_ipv4_out() 304 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMP && in nf_nat_ipv4_out() 305 ct->tuplehash[dir].tuple.src.u.all != in nf_nat_ipv4_out() 306 ct->tuplehash[!dir].tuple.dst.u.all)) { in nf_nat_ipv4_out() 330 if (ct->tuplehash[dir].tuple.dst.u3.ip != in nf_nat_ipv4_local_fn() 331 ct->tuplehash[!dir].tuple.src.u3.ip) { in nf_nat_ipv4_local_fn() [all …]
|
D | nf_nat_pptp.c | 66 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected() 68 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected() 75 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected() 77 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected() 99 = ct->master->tuplehash[!exp->dir].tuple.dst.u3; in pptp_nat_expected() 109 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in pptp_nat_expected() 155 new_callid = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.tcp.port; in pptp_outbound_pkt()
|
D | nf_nat_snmp_basic_main.c | 140 ctx.from = ct->tuplehash[dir].tuple.src.u3.ip; in snmp_translate() 141 ctx.to = ct->tuplehash[!dir].tuple.dst.u3.ip; in snmp_translate() 143 ctx.from = ct->tuplehash[!dir].tuple.src.u3.ip; in snmp_translate() 144 ctx.to = ct->tuplehash[dir].tuple.dst.u3.ip; in snmp_translate()
|
D | nf_socket_ipv4.c | 151 daddr = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.ip; in nf_sk_lookup_slow_v4() 153 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.tcp.port : in nf_sk_lookup_slow_v4() 154 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port; in nf_sk_lookup_slow_v4()
|
/Linux-v4.19/net/ipv6/netfilter/ |
D | nf_nat_l3proto_ipv6.c | 37 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv6_decode_session() 232 l4proto, &ct->tuplehash[!dir].tuple, !manip)) in nf_nat_icmpv6_reply_translation() 246 nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); in nf_nat_icmpv6_reply_translation() 325 if (!nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, in nf_nat_ipv6_out() 326 &ct->tuplehash[!dir].tuple.dst.u3) || in nf_nat_ipv6_out() 327 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMPV6 && in nf_nat_ipv6_out() 328 ct->tuplehash[dir].tuple.src.u.all != in nf_nat_ipv6_out() 329 ct->tuplehash[!dir].tuple.dst.u.all)) { in nf_nat_ipv6_out() 353 if (!nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, in nf_nat_ipv6_local_fn() 354 &ct->tuplehash[!dir].tuple.src.u3)) { in nf_nat_ipv6_local_fn() [all …]
|
/Linux-v4.19/include/net/netfilter/ |
D | nf_conntrack.h | 74 struct nf_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX]; member 112 tuplehash[hash->tuple.dst.dir]); in nf_ct_tuplehash_to_ctrack() 117 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num; in nf_ct_l3num() 122 return ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum; in nf_ct_protonum() 125 #define nf_ct_tuple(ct, dir) (&(ct)->tuplehash[dir].tuple)
|
/Linux-v4.19/net/netfilter/ipvs/ |
D | ip_vs_nfct.c | 120 new_tuple = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_update_conntrack() 138 ARG_TUPLE(&ct->tuplehash[IP_CT_DIR_REPLY].tuple)); in ip_vs_update_conntrack() 173 orig = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple; in ip_vs_nfct_expect_callback() 183 new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_nfct_expect_callback() 199 new_reply = ct->tuplehash[IP_CT_DIR_REPLY].tuple; in ip_vs_nfct_expect_callback()
|