| /kernel/linux/linux-5.10/tools/testing/selftests/tc-testing/tc-tests/actions/ |
| D | nat.json | 4 "name": "Add nat action on ingress with default control action", 7 "nat" 11 "$TC actions flush action nat", 17 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1", 19 "verifyCmd": "$TC actions ls action nat", 20 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 200.200.200.1 pass", 23 "$TC actions flush action nat" 28 "name": "Add nat action on ingress with pipe control action", 31 "nat" 35 "$TC actions flush action nat", [all …]
|
| D | ct.json | 172 "name": "Try ct with zone, commit, mark, nat", 185 …"cmdUnderTest": "$TC actions add action ct zone 404 commit mark 0x42 nat src addr 5.5.5.7 index 42… 188 …"matchPattern": "action order [0-9]*: ct commit mark 66 zone 404 nat src addr 5.5.5.7 pipe.*index … 196 "name": "Try ct with full nat ipv4 range syntax", 209 …"cmdUnderTest": "$TC actions add action ct commit nat src addr 5.5.5.7-5.5.6.0 port 1000-2000 inde… 212 …"matchPattern": "action order [0-9]*: ct commit zone 0 nat src addr 5.5.5.7-5.5.6.0 port 1000-2000… 220 "name": "Try ct with full nat ipv6 syntax", 233 … "cmdUnderTest": "$TC actions add action ct commit nat src addr 2001::1 port 1000-2000 index 44", 236 …"matchPattern": "action order [0-9]*: ct commit zone 0 nat src addr 2001::1 port 1000-2000 pipe.*i… 244 "name": "Try ct with full nat ipv6 range syntax", [all …]
|
| /kernel/linux/linux-4.19/tools/testing/selftests/tc-testing/tc-tests/actions/ |
| D | nat.json | 4 "name": "Add nat action on ingress with default control action", 7 "nat" 11 "$TC actions flush action nat", 17 "cmdUnderTest": "$TC actions add action nat ingress 192.168.1.1 200.200.200.1", 19 "verifyCmd": "$TC actions ls action nat", 20 "matchPattern": "action order [0-9]+: nat ingress 192.168.1.1/32 200.200.200.1 pass", 23 "$TC actions flush action nat" 28 "name": "Add nat action on ingress with pipe control action", 31 "nat" 35 "$TC actions flush action nat", [all …]
|
| /kernel/linux/linux-5.10/net/ipv4/netfilter/ |
| D | nf_nat_pptp.c | 5 * NAT support for PPTP (Point to Point Tunneling Protocol). 19 * TODO: - NAT to a unique tuple, not to TCP source port 40 MODULE_DESCRIPTION("Netfilter NAT helper module for PPTP"); 53 struct nf_conn_nat *nat; in pptp_nat_expected() local 55 nat = nf_ct_nat_ext_add(ct); in pptp_nat_expected() 56 if (WARN_ON_ONCE(!nat)) in pptp_nat_expected() 59 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_nat_expected() 129 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_outbound_pkt() local 135 if (WARN_ON_ONCE(!nat)) in pptp_outbound_pkt() 138 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_outbound_pkt() [all …]
|
| /kernel/linux/linux-4.19/net/ipv4/netfilter/ |
| D | nf_nat_pptp.c | 4 * NAT support for PPTP (Point to Point Tunneling Protocol). 18 * TODO: - NAT to a unique tuple, not to TCP source port 39 MODULE_DESCRIPTION("Netfilter NAT helper module for PPTP"); 52 struct nf_conn_nat *nat; in pptp_nat_expected() local 54 nat = nf_ct_nat_ext_add(ct); in pptp_nat_expected() 55 if (WARN_ON_ONCE(!nat)) in pptp_nat_expected() 58 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_nat_expected() 128 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_outbound_pkt() local 134 if (WARN_ON_ONCE(!nat)) in pptp_outbound_pkt() 137 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_outbound_pkt() [all …]
|
| D | Kconfig | 98 tristate "IPv4 NAT" 103 The IPv4 NAT option allows masquerading, port forwarding and other 115 tristate "IPv4 nf_tables nat chain support" 117 This option enables the "nat" chain for IPv4 in nf_tables. This 118 chain type is used to perform Network Address Translation (NAT) 150 SNMP payloads. In conjunction with NAT, it allows a network 153 inside SNMP payloads to match IP-layer NAT mapping. 177 tristate "IP tables support (required for filtering/masq/NAT)" 182 The packet filtering and full NAT (masquerading, port forwarding, 265 # NAT + specific targets: nf_conntrack [all …]
|
| D | nf_nat_masquerade_ipv4.c | 30 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv4() local 57 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv4() 58 if (nat) in nf_nat_masquerade_ipv4() 59 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv4() 77 const struct nf_conn_nat *nat = nfct_nat(i); in device_cmp() local 79 if (!nat) in device_cmp() 83 return nat->masq_index == (int)(long)ifindex; in device_cmp()
|
| D | nf_nat_proto_gre.c | 4 * NAT protocol helper module for GRE. 7 * suited for NAT, as it has no protocol-specific part as port numbers. 38 MODULE_DESCRIPTION("Netfilter NAT protocol helper module for GRE"); 79 pr_debug("%p: no NAT mapping\n", ct); in gre_unique_tuple() 109 /* We do not currently NAT any GREv0 packets. in gre_manip_pkt() 117 pr_debug("can't nat unknown GRE version\n"); in gre_manip_pkt()
|
| /kernel/linux/linux-5.10/fs/f2fs/ |
| D | node.h | 11 /* node block offset on the NAT area dedicated to the given start node id */ 34 /* vector size for gang look-up from nat cache that consists of radix tree */ 46 IS_DIRTY, /* this nat entry is dirty? */ 47 IS_PREALLOC, /* nat entry is preallocated */ 62 struct list_head list; /* for clean or dirty nat list */ 66 #define nat_get_nid(nat) ((nat)->ni.nid) argument 67 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) argument 68 #define nat_get_blkaddr(nat) ((nat)->ni.blk_addr) argument 69 #define nat_set_blkaddr(nat, b) ((nat)->ni.blk_addr = (b)) argument 70 #define nat_get_ino(nat) ((nat)->ni.ino) argument [all …]
|
| /kernel/linux/linux-4.19/fs/f2fs/ |
| D | node.h | 14 /* node block offset on the NAT area dedicated to the given start node id */ 34 /* vector size for gang look-up from nat cache that consists of radix tree */ 46 IS_DIRTY, /* this nat entry is dirty? */ 47 IS_PREALLOC, /* nat entry is preallocated */ 62 struct list_head list; /* for clean or dirty nat list */ 66 #define nat_get_nid(nat) ((nat)->ni.nid) argument 67 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) argument 68 #define nat_get_blkaddr(nat) ((nat)->ni.blk_addr) argument 69 #define nat_set_blkaddr(nat, b) ((nat)->ni.blk_addr = (b)) argument 70 #define nat_get_ino(nat) ((nat)->ni.ino) argument [all …]
|
| /kernel/linux/linux-4.19/include/net/netfilter/ |
| D | nf_nat.h | 21 /* per conntrack: nat application helper private data */ 23 /* insert nat helper private data here */ 65 struct nf_conn_nat *nat, in nf_nat_oif_changed() argument 70 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && in nf_nat_oif_changed() 72 nat->masq_index != out->ifindex; in nf_nat_oif_changed()
|
| /kernel/linux/linux-4.19/tools/testing/selftests/netfilter/ |
| D | nft_nat.sh | 3 # This test is for basic NAT functionality: snat, dnat, redirect, masquerade. 150 table ip6 nat { 152 type nat hook output priority 0; policy accept; 209 ip netns exec ns0 nft flush chain ip6 nat output 218 table ip nat { 220 type nat hook output priority 0; policy accept; 273 ip netns exec ns0 nft flush chain ip nat output 320 test $lret -eq 0 && echo "PASS: ping to ns1 OK after nat output chain flush" 358 table ip6 nat { 360 type nat hook postrouting priority 0; policy accept; [all …]
|
| /kernel/linux/linux-5.10/net/openvswitch/ |
| D | conntrack.c | 51 OVS_CT_NAT = 1 << 0, /* NAT for committed connections only. */ 52 OVS_CT_SRC_NAT = 1 << 1, /* Source NAT for NEW connections. */ 53 OVS_CT_DST_NAT = 1 << 2, /* Destination NAT for NEW connections. */ 62 u8 nat : 3; /* enum ovs_ct_nat */ member 72 struct nf_nat_range2 range; /* Only present for SRC NAT and DST NAT. */ 230 * 'keep_nat_flags' is true, the existing NAT flags retained, else they are 483 * FTP with NAT) adusting the TCP payload size when mangling IP in ovs_ct_helper() 621 /* Must invert the tuple if skb has been transformed by NAT. */ in ovs_ct_find_existing() 734 * range is only used for new, uninitialized NAT state. 749 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in ovs_ct_nat_execute() [all …]
|
| /kernel/linux/linux-5.10/net/netfilter/ |
| D | nft_chain_nat.c | 37 .name = "nat", 58 .name = "nat", 89 .name = "nat", 141 MODULE_ALIAS_NFT_CHAIN(AF_INET, "nat"); 144 MODULE_ALIAS_NFT_CHAIN(AF_INET6, "nat"); 147 MODULE_ALIAS_NFT_CHAIN(1, "nat"); /* NFPROTO_INET */
|
| D | nf_nat_masquerade.c | 32 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv4() local 59 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv4() 60 if (nat) in nf_nat_masquerade_ipv4() 61 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv4() 136 const struct nf_conn_nat *nat = nfct_nat(i); in device_cmp() local 139 if (!nat) in device_cmp() 141 return nat->masq_index == w->ifindex; in device_cmp() 240 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv6() local 253 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv6() 254 if (nat) in nf_nat_masquerade_ipv6() [all …]
|
| D | nf_conntrack_helper.c | 153 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_try_module_get() local 164 nat = nf_conntrack_nat_helper_find(h->nat_mod_name); in nf_nat_helper_try_module_get() 165 if (!nat) { in nf_nat_helper_try_module_get() 171 nat = nf_conntrack_nat_helper_find(mod_name); in nf_nat_helper_try_module_get() 172 if (!nat) { in nf_nat_helper_try_module_get() 178 if (!try_module_get(nat->module)) in nf_nat_helper_try_module_get() 188 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_put() local 190 nat = nf_conntrack_nat_helper_find(helper->nat_mod_name); in nf_nat_helper_put() 191 if (WARN_ON_ONCE(!nat)) in nf_nat_helper_put() 194 module_put(nat->module); in nf_nat_helper_put() [all …]
|
| /kernel/linux/linux-5.10/include/net/netfilter/ |
| D | nf_nat.h | 22 /* per conntrack: nat application helper private data */ 24 /* insert nat helper private data here */ 59 struct nf_conn_nat *nat, in nf_nat_oif_changed() argument 63 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && in nf_nat_oif_changed() 65 nat->masq_index != out->ifindex; in nf_nat_oif_changed()
|
| /kernel/linux/linux-4.19/net/ipv6/netfilter/ |
| D | nf_nat_masquerade_ipv6.c | 9 * NAT funded by Astaro. 32 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv6() local 45 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv6() 46 if (nat) in nf_nat_masquerade_ipv6() 47 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv6() 61 const struct nf_conn_nat *nat = nfct_nat(ct); in device_cmp() local 63 if (!nat) in device_cmp() 67 return nat->masq_index == (int)(long)ifindex; in device_cmp()
|
| /kernel/linux/linux-5.10/tools/testing/selftests/netfilter/ |
| D | nft_nat.sh | 3 # This test is for basic NAT functionality: snat, dnat, redirect, masquerade. 185 table $family nat { 187 type nat hook output priority 0; policy accept; 244 ip netns exec "$ns0" nft flush chain ip6 nat output 260 table $family nat { 262 type nat hook output priority 0; policy accept; 269 echo "SKIP: inet nat tests" 325 ip netns exec "$ns0" nft flush chain $family nat output 372 test $lret -eq 0 && echo "PASS: ping to $ns1 OK after $family nat output chain flush" 412 table $family nat { [all …]
|
| /kernel/linux/linux-4.19/net/openvswitch/ |
| D | conntrack.c | 60 OVS_CT_NAT = 1 << 0, /* NAT for committed connections only. */ 61 OVS_CT_SRC_NAT = 1 << 1, /* Source NAT for NEW connections. */ 62 OVS_CT_DST_NAT = 1 << 2, /* Destination NAT for NEW connections. */ 71 u8 nat : 3; /* enum ovs_ct_nat */ member 79 struct nf_nat_range2 range; /* Only present for SRC NAT and DST NAT. */ 237 * 'keep_nat_flags' is true, the existing NAT flags retained, else they are 490 * FTP with NAT) adusting the TCP payload size when mangling IP in ovs_ct_helper() 623 /* Must invert the tuple if skb has been transformed by NAT. */ in ovs_ct_find_existing() 728 * range is only used for new, uninitialized NAT state. 743 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in ovs_ct_nat_execute() [all …]
|
| /kernel/linux/linux-5.10/arch/ia64/kernel/ |
| D | unwind_i.h | 119 UNW_NAT_NONE, /* NaT not represented */ 120 UNW_NAT_VAL, /* NaT represented by NaT value (fp reg) */ 121 UNW_NAT_MEMSTK, /* NaT value is in unat word at offset OFF */ 122 UNW_NAT_REGSTK /* NaT is in rnat */ 132 UNW_INSN_SETNAT_MEMSTK, /* s[dst+1].nat.type = MEMSTK; 133 s[dst+1].nat.off = *s.pri_unat - s[dst] */ 134 UNW_INSN_SETNAT_TYPE, /* s[dst+1].nat.type = val */
|
| /kernel/linux/linux-4.19/arch/ia64/kernel/ |
| D | unwind_i.h | 119 UNW_NAT_NONE, /* NaT not represented */ 120 UNW_NAT_VAL, /* NaT represented by NaT value (fp reg) */ 121 UNW_NAT_MEMSTK, /* NaT value is in unat word at offset OFF */ 122 UNW_NAT_REGSTK /* NaT is in rnat */ 132 UNW_INSN_SETNAT_MEMSTK, /* s[dst+1].nat.type = MEMSTK; 133 s[dst+1].nat.off = *s.pri_unat - s[dst] */ 134 UNW_INSN_SETNAT_TYPE, /* s[dst+1].nat.type = val */
|
| /kernel/linux/linux-4.19/arch/ia64/lib/ |
| D | strlen.S | 46 // a NaT bit will be set if the translation is not present. The normal 62 // - after the loop we must test for Nat values because neither the 63 // czx nor cmp instruction raise a NaT consumption fault. We must be 64 // careful not to look too far for a Nat for which we don't care. 65 // For instance we don't need to look at a NaT in val2 if the zero byte 131 tnat.nz p6,p7=val1 // test NaT on val1 132 (p6) br.cond.spnt .recover // jump to recovery if val1 is NaT 138 tnat.nz.and p7,p0=val2 // test NaT if val2 139 (p7) br.cond.spnt .recover // jump to recovery if val2 is NaT
|
| /kernel/linux/linux-5.10/arch/ia64/lib/ |
| D | strlen.S | 46 // a NaT bit will be set if the translation is not present. The normal 62 // - after the loop we must test for Nat values because neither the 63 // czx nor cmp instruction raise a NaT consumption fault. We must be 64 // careful not to look too far for a Nat for which we don't care. 65 // For instance we don't need to look at a NaT in val2 if the zero byte 131 tnat.nz p6,p7=val1 // test NaT on val1 132 (p6) br.cond.spnt .recover // jump to recovery if val1 is NaT 138 tnat.nz.and p7,p0=val2 // test NaT if val2 139 (p7) br.cond.spnt .recover // jump to recovery if val2 is NaT
|
| /kernel/linux/linux-4.19/arch/arc/plat-eznps/ |
| D | mtm.c | 46 int log_nat, nat = 0, i, t; in mtm_init_nat() local 48 /* Iterate core threads and update nat */ in mtm_init_nat() 50 nat += test_bit(t, cpumask_bits(cpu_possible_mask)); in mtm_init_nat() 52 log_nat = ilog2(nat); in mtm_init_nat() 55 udmc.nat = log_nat; in mtm_init_nat() 59 mtm_cfg.nat = log_nat; in mtm_init_nat()
|