/linux-master/net/ipv4/netfilter/ |
H A D | nf_nat_pptp.c | 53 struct nf_conn_nat *nat; local 55 nat = nf_ct_nat_ext_add(ct); 56 if (WARN_ON_ONCE(!nat)) 59 nat_pptp_info = &nat->help.nat_pptp_info; 129 struct nf_conn_nat *nat = nfct_nat(ct); local 135 if (WARN_ON_ONCE(!nat)) 138 nat_pptp_info = &nat->help.nat_pptp_info; 203 struct nf_conn_nat *nat = nfct_nat(ct); local 207 if (WARN_ON_ONCE(!nat)) 210 nat_pptp_info = &nat 239 struct nf_conn_nat *nat = nfct_nat(ct); local [all...] |
/linux-master/include/net/netfilter/ |
H A 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, 63 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && 65 nat->masq_index != out->ifindex; 57 nf_nat_oif_changed(unsigned int hooknum, enum ip_conntrack_info ctinfo, struct nf_conn_nat *nat, const struct net_device *out) argument
|
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-master/fs/f2fs/ |
H A D | node.h | 37 /* vector size for gang look-up from nat cache that consists of radix tree */ 51 IS_DIRTY, /* this nat entry is dirty? */ 52 IS_PREALLOC, /* nat entry is preallocated */ 67 struct list_head list; /* for clean or dirty nat list */ 71 #define nat_get_nid(nat) ((nat)->ni.nid) 72 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) 73 #define nat_get_blkaddr(nat) ((nat) [all...] |
/linux-master/net/netfilter/ |
H A D | nf_nat_masquerade.c | 33 struct nf_conn_nat *nat; local 60 nat = nf_ct_nat_ext_add(ct); 61 if (nat) 62 nat->masq_index = out->ifindex; 141 const struct nf_conn_nat *nat = nfct_nat(i); local 144 if (!nat) 146 return nat->masq_index == w->ifindex; 245 struct nf_conn_nat *nat; local 258 nat = nf_ct_nat_ext_add(ct); 259 if (nat) [all...] |
H A D | nf_conntrack_helper.c | 132 struct nf_conntrack_nat_helper *nat; local 143 nat = nf_conntrack_nat_helper_find(h->nat_mod_name); 144 if (!nat) { 150 nat = nf_conntrack_nat_helper_find(mod_name); 151 if (!nat) { 157 if (!try_module_get(nat->module)) 167 struct nf_conntrack_nat_helper *nat; local 169 nat = nf_conntrack_nat_helper_find(helper->nat_mod_name); 170 if (WARN_ON_ONCE(!nat)) 173 module_put(nat 485 nf_nat_helper_register(struct nf_conntrack_nat_helper *nat) argument 493 nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat) argument [all...] |
H A D | nf_conntrack_ovs.c | 79 u8 proto, bool nat, struct nf_conntrack_helper **hp) 95 if (nat) { 78 nf_ct_add_helper(struct nf_conn *ct, const char *name, u8 family, u8 proto, bool nat, struct nf_conntrack_helper **hp) argument
|
H A D | nf_nat_core.c | 655 struct nf_conn_nat *nat = nfct_nat(ct); local 656 if (nat) 657 return nat; 660 nat = nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC); 662 return nat; 674 /* Can't setup nat info for confirmed ct. */ 805 struct nf_conn_nat *nat; local 818 nat = nfct_nat(ct); 853 if (nf_nat_oif_changed(state->hook, ctinfo, nat, 862 if (nf_nat_oif_changed(state->hook, ctinfo, nat, stat 1004 nfnetlink_parse_nat(const struct nlattr *nat, const struct nf_conn *ct, struct nf_nat_range2 *range) argument [all...] |
H A D | nf_conntrack_pptp.c | 511 struct nf_conn_nat *nat = nf_ct_ext_find(ct, NF_CT_EXT_NAT); local 513 if (!nat && !nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC))
|
/linux-master/tools/testing/selftests/netfilter/ |
H A D | conntrack_vrf.sh | 163 table ip nat { 175 type nat hook postrouting priority 0; 189 # must also check that nat table was evaluated on second (lower device) iteration. 190 ip netns exec $ns0 nft list table ip nat |grep -q 'counter packets 2' && 191 ip netns exec $ns0 nft list table ip nat |grep -q 'untracked counter packets [1-9]' 212 table ip nat { 214 type nat hook postrouting priority 0; 226 # must also check that nat table was evaluated on second (lower device) iteration. 227 ip netns exec $ns0 nft list table ip nat |grep -q 'counter packets 2'
|
H A D | nf_nat_edemux.sh | 73 ip netns exec $ns2 iptables -t nat -A OUTPUT -d 10.96.0.1/32 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.1:5201 99 ip netns exec $ns1 iptables -t nat -A PREROUTING -p tcp --dport 5202 -j REDIRECT --to-ports 5201 100 ip netns exec $ns1 iptables -t nat -A PREROUTING -p tcp --dport 5203 -j REDIRECT --to-ports 5201
|
H A D | nft_nat.sh | 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" 386 table $family nat { 388 type nat hoo [all...] |
H A D | conntrack_icmp_related.sh | 15 # nat of "established" icmp-echo "connection". 193 # make sure NAT core rewrites adress of icmp error if nat is used according to 194 # conntrack nat information (icmp error will be directed at nsrouter1 address, 197 table ip nat { 199 type nat hook postrouting priority 0; policy accept; 203 table ip6 nat { 205 type nat hook postrouting priority 0; policy accept;
|
H A D | conntrack_tcp_unreplied.sh | 118 table inet nat { 120 type nat hook prerouting priority 0; policy accept; 126 echo "ERROR: Could not load nat redirect" 136 echo "INFO: NAT redirect added in ns $ns2, waiting for $waittime seconds for nat to take effect"
|
H A D | nft_flowtable.sh | 503 table ip nat { 505 type nat hook prerouting priority 0; policy accept; 510 type nat hook postrouting priority 0; policy accept; 560 flush table ip nat 561 table ip nat { 563 type nat hook prerouting priority 0; policy accept; 568 type nat hook postrouting priority 0; policy accept; 657 ip netns exec $nsr1 nft delete table ip nat
|
/linux-master/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) argument 122 matchers = nat ? &fs_smfs->matchers_nat : &fs_smfs->matchers; 148 tbl = nat ? fs_smfs->ct_nat_tbl : fs_smfs->ct_tbl; 152 "ct_fs_smfs: failed to create matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n", 153 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); 305 bool nat, tcp, ipv4, gre; local 324 nat = (attr->ft == fs_smfs->ct_nat); 331 smfs_matcher = mlx5_ct_fs_smfs_matcher_get(fs, nat, ipv4, tcp, gre);
|
/linux-master/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_tc.c | 212 actions->nat.l3_is_ipv4 = true; 214 actions->nat.src_xlate = true; 215 actions->nat.l3.ipv4.saddr.s_addr = htonl(val); 217 actions->nat.src_xlate = false; 218 actions->nat.l3.ipv4.daddr.s_addr = htonl(val); 226 netdev_dbg(bp->dev, "nat.src_xlate = %d src IP: %pI4 dst ip : %pI4\n", 227 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, 228 &actions->nat.l3.ipv4.daddr); 233 actions->nat [all...] |
H A D | bnxt_tc.h | 101 } nat; member in struct:bnxt_tc_actions
|
/linux-master/tools/testing/selftests/net/forwarding/ |
H A D | tc_actions.sh | 167 ct commit nat src addr 192.0.2.2 pipe \ 169 ct commit nat dst addr 192.0.2.1 pipe \ 212 action ct commit nat src addr 192.0.2.2 pipe \ 214 action ct commit nat dst addr 192.0.2.1 pipe \
|
/linux-master/net/openvswitch/ |
H A D | conntrack.c | 66 u8 nat : 3; /* enum ovs_ct_nat */ member in struct:ovs_conntrack_info 669 if (!(info->nat & OVS_CT_NAT)) 671 if (info->nat & OVS_CT_SRC_NAT) 673 if (info->nat & OVS_CT_DST_NAT) 759 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && 780 if (info->nat && !nfct_seqadj(ct)) { 1101 if (info->nat) { 1105 info->nat |= OVS_CT_NAT; 1106 info->nat |= ((type == OVS_NAT_ATTR_SRC) 1147 OVS_NLERR(log, "Unknown nat attribut [all...] |
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/en/ |
H A D | tc_ct.c | 44 * ipv6 and port nat (5) + tuple fields (4) + nic mode zone restore (1) = 10. 90 bool nat; member in struct:mlx5_ct_zone_rule 512 bool nat) 514 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; 793 bool nat, u8 zone_restore_id) 795 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; 801 zone_rule->nat = nat; 816 nat, 828 attr->ft = nat 510 mlx5_tc_ct_entry_del_rule(struct mlx5_tc_ct_priv *ct_priv, struct mlx5_ct_entry *entry, bool nat) argument 790 mlx5_tc_ct_entry_add_rule(struct mlx5_tc_ct_priv *ct_priv, struct flow_rule *flow_rule, struct mlx5_ct_entry *entry, bool nat, u8 zone_restore_id) argument 867 mlx5_tc_ct_entry_replace_rule(struct mlx5_tc_ct_priv *ct_priv, struct flow_rule *flow_rule, struct mlx5_ct_entry *entry, bool nat, u8 zone_restore_id) argument 1555 tc_ct_pre_ct_add_rules(struct mlx5_ct_ft *ct_ft, struct mlx5_tc_ct_pre *pre_ct, bool nat) argument 1655 mlx5_tc_ct_alloc_pre_ct(struct mlx5_ct_ft *ct_ft, struct mlx5_tc_ct_pre *pre_ct, bool nat) argument 1925 bool nat = attr->ct_attr.ct_action & TCA_CT_ACT_NAT; local [all...] |
/linux-master/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 | 91 ip netns exec "${PEER_NS}" $ipt_cmd -t nat -I PREROUTING -d ${addr1} -j DNAT --to-destination ${addr2%/*}
|
/linux-master/tools/testing/selftests/wireguard/ |
H A D | netns.sh | 337 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 388 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 395 n0 iptables -t nat -F 397 n2 iptables -t nat -F
|
/linux-master/drivers/net/ethernet/intel/idpf/ |
H A D | idpf_singleq_txrx.c | 680 if (unlikely(csum_bits->nat && csum_bits->eudpe)) 748 csum_bits.nat = 0; 787 csum_bits.nat = FIELD_GET(VIRTCHNL2_RX_FLEX_DESC_STATUS1_NAT_M,
|