/linux/fs/f2fs/ |
H A D | node.h | 71 #define nat_get_nid(nat) ((nat)->ni.nid) argument 72 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) argument 73 #define nat_get_blkaddr(nat) ((nat)->ni.blk_addr) argument 74 #define nat_set_blkaddr(nat, b) ((nat)->ni.blk_addr = (b)) argument 75 #define nat_get_ino(nat) ((nat)->ni.ino) argument 76 #define nat_set_ino(nat, i) ((nat)->ni.ino = (i)) argument 77 #define nat_get_version(nat) ((nat)->ni.version) argument 78 #define nat_set_version(nat, v) ((nat)->ni.version = (v)) argument
|
/linux/net/ipv4/netfilter/ |
H A D | nf_nat_pptp.c | 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() 203 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_exp_gre() local 207 if (WARN_ON_ONCE(!nat)) in pptp_exp_gre() 210 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_exp_gre() [all …]
|
/linux/net/netfilter/ |
H A D | nf_conntrack_helper.c | 132 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_try_module_get() local 143 nat = nf_conntrack_nat_helper_find(h->nat_mod_name); in nf_nat_helper_try_module_get() 144 if (!nat) { in nf_nat_helper_try_module_get() 150 nat = nf_conntrack_nat_helper_find(mod_name); in nf_nat_helper_try_module_get() 151 if (!nat) { in nf_nat_helper_try_module_get() 157 if (!try_module_get(nat->module)) in nf_nat_helper_try_module_get() 167 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_put() local 169 nat = nf_conntrack_nat_helper_find(helper->nat_mod_name); in nf_nat_helper_put() 170 if (WARN_ON_ONCE(!nat)) in nf_nat_helper_put() 173 module_put(nat->module); in nf_nat_helper_put() [all …]
|
H A D | nf_nat_masquerade.c | 33 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv4() local 60 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv4() 61 if (nat) in nf_nat_masquerade_ipv4() 62 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv4() 141 const struct nf_conn_nat *nat = nfct_nat(i); in device_cmp() local 144 if (!nat) in device_cmp() 146 return nat->masq_index == w->ifindex; in device_cmp() 245 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv6() local 258 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv6() 259 if (nat) in nf_nat_masquerade_ipv6() [all …]
|
H A D | nf_nat_core.c | 771 struct nf_conn_nat *nat = nfct_nat(ct); in nf_ct_nat_ext_add() local 772 if (nat) in nf_ct_nat_ext_add() 773 return nat; in nf_ct_nat_ext_add() 776 nat = nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC); in nf_ct_nat_ext_add() 778 return nat; in nf_ct_nat_ext_add() 921 struct nf_conn_nat *nat; in nf_nat_inet_fn() local 934 nat = nfct_nat(ct); in nf_nat_inet_fn() 969 if (nf_nat_oif_changed(state->hook, ctinfo, nat, in nf_nat_inet_fn() 978 if (nf_nat_oif_changed(state->hook, ctinfo, nat, state->out)) in nf_nat_inet_fn() 1118 nfnetlink_parse_nat(const struct nlattr *nat, in nfnetlink_parse_nat() argument [all …]
|
H A D | nf_conntrack_ovs.c | 79 u8 proto, bool nat, struct nf_conntrack_helper **hp) in nf_ct_add_helper() argument 95 if (nat) { in nf_ct_add_helper()
|
H A D | nf_conntrack_pptp.c | 511 struct nf_conn_nat *nat = nf_ct_ext_find(ct, NF_CT_EXT_NAT); in conntrack_pptp_help() local 513 if (!nat && !nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC)) in conntrack_pptp_help()
|
/linux/tools/testing/selftests/net/netfilter/ |
H A D | nft_nat.sh | 159 table $family nat { 161 type nat hook output priority 0; policy accept; 213 ip netns exec "$ns0" nft flush chain ip6 nat output 229 table $family nat { 231 type nat hook output priority 0; policy accept; 289 ip netns exec "$ns0" nft flush chain "$family" nat output 351 table $family nat { 353 type nat hook output priority 0; policy accept; 413 table $family nat { 415 type nat hook postrouting priority 0; policy accept; [all …]
|
H A D | conntrack_vrf.sh | 153 table ip nat { 165 type nat hook postrouting priority 0; 179 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1' && 180 ip netns exec "$ns0" nft list table ip nat |grep -q 'untracked counter packets [1-9]'; then 200 table ip nat { 202 type nat hook postrouting priority 0; 214 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1'; then
|
H A D | nf_nat_edemux.sh | 47 ip netns exec "$ns2" iptables -t nat -A OUTPUT -d 10.96.0.1/32 -p tcp --dport 443 -j DNAT --to-dest… 71 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5202 -j REDIRECT --to-ports 5201 72 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5203 -j REDIRECT --to-ports 5201
|
H A D | conntrack_reverse_clash.sh | 20 table ip nat { 22 type nat hook postrouting priority srcnat; policy accept;
|
H A D | nft_flowtable.sh | 479 table ip nat { 481 type nat hook prerouting priority 0; policy accept; 486 type nat hook postrouting priority 0; policy accept; 541 flush table ip nat 542 table ip nat { 544 type nat hook prerouting priority 0; policy accept; 549 type nat hook postrouting priority 0; policy accept; 640 ip netns exec "$nsr1" nft delete table ip nat
|
H A D | conntrack_icmp_related.sh | 178 table ip nat { 180 type nat hook postrouting priority 0; policy accept; 184 table ip6 nat { 186 type nat hook postrouting priority 0; policy accept;
|
H A D | conntrack_tcp_unreplied.sh | 127 table inet nat { 129 type nat hook prerouting priority 0; policy accept;
|
/linux/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_tc.c | 212 actions->nat.l3_is_ipv4 = true; in bnxt_tc_parse_pedit() 214 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit() 215 actions->nat.l3.ipv4.saddr.s_addr = htonl(val); in bnxt_tc_parse_pedit() 217 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit() 218 actions->nat.l3.ipv4.daddr.s_addr = htonl(val); in bnxt_tc_parse_pedit() 227 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, in bnxt_tc_parse_pedit() 228 &actions->nat.l3.ipv4.daddr); in bnxt_tc_parse_pedit() 233 actions->nat.l3_is_ipv4 = false; in bnxt_tc_parse_pedit() 239 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit() 242 actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); in bnxt_tc_parse_pedit() [all …]
|
H A D | bnxt_tc.h | 101 } nat; member
|
/linux/include/net/netfilter/ |
H A D | nf_nat.h | 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()
|
H A D | nf_conntrack_helper.h | 121 u8 proto, bool nat, struct nf_conntrack_helper **hp); 178 void nf_nat_helper_register(struct nf_conntrack_nat_helper *nat); 179 void nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat);
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/tc/ |
H A D | ct_fs_smfs.c | 112 mlx5_ct_fs_smfs_matcher_get(struct mlx5_ct_fs *fs, bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_smfs_matcher_get() argument 122 matchers = nat ? &fs_smfs->matchers_nat : &fs_smfs->matchers; in mlx5_ct_fs_smfs_matcher_get() 148 tbl = nat ? fs_smfs->ct_nat_tbl : fs_smfs->ct_tbl; in mlx5_ct_fs_smfs_matcher_get() 153 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get() 305 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_smfs_ct_rule_add() local 324 nat = (attr->ft == fs_smfs->ct_nat); in mlx5_ct_fs_smfs_ct_rule_add() 331 smfs_matcher = mlx5_ct_fs_smfs_matcher_get(fs, nat, ipv4, tcp, gre); in mlx5_ct_fs_smfs_ct_rule_add()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | tc_ct.c | 92 bool nat; member 522 bool nat) in mlx5_tc_ct_entry_del_rule() argument 524 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_del_rule() 805 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_add_rule() argument 807 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_add_rule() 813 zone_rule->nat = nat; in mlx5_tc_ct_entry_add_rule() 828 nat, in mlx5_tc_ct_entry_add_rule() 840 attr->ft = nat ? ct_priv->ct_nat : ct_priv->ct; in mlx5_tc_ct_entry_add_rule() 857 ct_dbg("Failed to add ct entry rule, nat: %d", nat); in mlx5_tc_ct_entry_add_rule() 882 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_update_rule() argument [all …]
|
/linux/net/openvswitch/ |
H A D | conntrack.c | 66 u8 nat : 3; /* enum ovs_ct_nat */ member 674 if (!(info->nat & OVS_CT_NAT)) in ovs_ct_nat() 676 if (info->nat & OVS_CT_SRC_NAT) in ovs_ct_nat() 678 if (info->nat & OVS_CT_DST_NAT) in ovs_ct_nat() 782 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && in __ovs_ct_lookup() 806 if (info->nat && !nfct_seqadj(ct)) { in __ovs_ct_lookup() 1133 if (info->nat) { in parse_nat() 1137 info->nat |= OVS_CT_NAT; in parse_nat() 1138 info->nat |= ((type == OVS_NAT_ATTR_SRC) in parse_nat() 1188 if (!info->nat) { in parse_nat() [all …]
|
/linux/tools/testing/selftests/net/forwarding/ |
H A D | tc_actions.sh | 168 ct commit nat src addr 192.0.2.2 pipe \ 170 ct commit nat dst addr 192.0.2.1 pipe \ 213 action ct commit nat src addr 192.0.2.2 pipe \ 215 action ct commit nat dst addr 192.0.2.1 pipe \
|
/linux/tools/testing/selftests/net/ |
H A D | udpgro_fwd.sh | 233 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $BM_NET$DST_NAT \ 255 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $OL_NET$DST_NAT \
|
H A D | udpgro.sh | 92 …ip netns exec "${PEER_NS}" $ipt_cmd -t nat -I PREROUTING -d ${addr1} -j DNAT --to-destination ${ad…
|
/linux/tools/testing/selftests/wireguard/ |
H A D | netns.sh | 338 n0 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 10.0.0.0/24 -j SNAT --to 10.0.0.1 389 n2 iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -d 192.168.241.0/24 -j SNAT --to 192.168.241.2 396 n0 iptables -t nat -F 398 n2 iptables -t nat -F
|