/kernel/linux/linux-5.10/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 in pptp_exp_gre() 239 struct nf_conn_nat *nat = nfct_nat(ct); pptp_inbound_pkt() local [all...] |
/kernel/linux/linux-6.6/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 in pptp_exp_gre() 239 struct nf_conn_nat *nat = nfct_nat(ct); pptp_inbound_pkt() local [all...] |
/kernel/linux/linux-5.10/fs/f2fs/ |
H A D | node.h | 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) 67 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) 68 #define nat_get_blkaddr(nat) ((nat) [all...] |
/kernel/linux/linux-6.6/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...] |
/kernel/linux/linux-5.10/net/netfilter/ |
H A 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...] |
H A 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 in nf_nat_helper_put() 539 nf_nat_helper_register(struct nf_conntrack_nat_helper *nat) nf_nat_helper_register() argument 547 nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat) nf_nat_helper_unregister() argument [all...] |
/kernel/linux/linux-6.6/net/netfilter/ |
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_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 in nf_nat_helper_put() 490 nf_nat_helper_register(struct nf_conntrack_nat_helper *nat) nf_nat_helper_register() argument 498 nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat) nf_nat_helper_unregister() argument [all...] |
/kernel/linux/linux-5.10/arch/ia64/kernel/ |
H A D | mca.c | 858 u64 fslot, tslot, nat; in copy_reg() local 863 nat = (fnat >> fslot) & 1; in copy_reg() 864 *tnat |= (nat << tslot); in copy_reg() 895 unsigned long *nat) in finish_pt_regs() 919 copy_reg(&ms->pmsa_gr[1-1], ms->pmsa_nat_bits, ®s->r1, nat); in finish_pt_regs() 920 copy_reg(&ms->pmsa_gr[2-1], ms->pmsa_nat_bits, ®s->r2, nat); in finish_pt_regs() 921 copy_reg(&ms->pmsa_gr[3-1], ms->pmsa_nat_bits, ®s->r3, nat); in finish_pt_regs() 922 copy_reg(&ms->pmsa_gr[8-1], ms->pmsa_nat_bits, ®s->r8, nat); in finish_pt_regs() 923 copy_reg(&ms->pmsa_gr[9-1], ms->pmsa_nat_bits, ®s->r9, nat); in finish_pt_regs() 924 copy_reg(&ms->pmsa_gr[10-1], ms->pmsa_nat_bits, ®s->r10, nat); in finish_pt_regs() 894 finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos, unsigned long *nat) finish_pt_regs() argument 981 unsigned long old_unat, old_rnat, new_rnat, nat; ia64_mca_modify_original_stack() local [all...] |
H A D | unaligned.c | 308 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, int nat) in set_rse_reg() argument 342 if (nat) in set_rse_reg() 366 DPRINT("rnat @%p = 0x%lx nat=%d old nat=%ld\n", in set_rse_reg() 367 (void *) rnat_addr, rnats, nat, (rnats >> ia64_rse_slot_num(addr)) & 1); in set_rse_reg() 370 if (nat) in set_rse_reg() 381 get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int *nat) in get_rse_reg() argument 410 if (nat) { in get_rse_reg() 415 *nat = (*rnat_addr & nat_mask) != 0; in get_rse_reg() 434 if (nat) { in get_rse_reg() 454 setreg(unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs) setreg() argument 628 getreg(unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs) getreg() argument [all...] |
H A D | ptrace.c | 112 ia64_put_scratch_nat_bits (struct pt_regs *pt, unsigned long nat) in ia64_put_scratch_nat_bits() argument 114 # define PUT_BITS(first, last, nat) \ in ia64_put_scratch_nat_bits() 124 ia64_rotl(nat & mask, dist); \ in ia64_put_scratch_nat_bits() 133 scratch_unat = PUT_BITS( 1, 1, nat); in ia64_put_scratch_nat_bits() 134 scratch_unat |= PUT_BITS( 2, 3, nat); in ia64_put_scratch_nat_bits() 135 scratch_unat |= PUT_BITS(12, 13, nat); in ia64_put_scratch_nat_bits() 136 scratch_unat |= PUT_BITS(14, 14, nat); in ia64_put_scratch_nat_bits() 137 scratch_unat |= PUT_BITS(15, 15, nat); in ia64_put_scratch_nat_bits() 138 scratch_unat |= PUT_BITS( 8, 11, nat); in ia64_put_scratch_nat_bits() 139 scratch_unat |= PUT_BITS(16, 31, nat); in ia64_put_scratch_nat_bits() 790 char nat = 0; access_nat_bits() local 832 char nat = 0; ptrace_getregs() local 1300 char nat = 0; access_elf_gpreg() local [all...] |
/kernel/linux/linux-6.6/arch/ia64/kernel/ |
H A D | mca.c | 859 u64 fslot, tslot, nat; in copy_reg() local 864 nat = (fnat >> fslot) & 1; in copy_reg() 865 *tnat |= (nat << tslot); in copy_reg() 896 unsigned long *nat) in finish_pt_regs() 920 copy_reg(&ms->pmsa_gr[1-1], ms->pmsa_nat_bits, ®s->r1, nat); in finish_pt_regs() 921 copy_reg(&ms->pmsa_gr[2-1], ms->pmsa_nat_bits, ®s->r2, nat); in finish_pt_regs() 922 copy_reg(&ms->pmsa_gr[3-1], ms->pmsa_nat_bits, ®s->r3, nat); in finish_pt_regs() 923 copy_reg(&ms->pmsa_gr[8-1], ms->pmsa_nat_bits, ®s->r8, nat); in finish_pt_regs() 924 copy_reg(&ms->pmsa_gr[9-1], ms->pmsa_nat_bits, ®s->r9, nat); in finish_pt_regs() 925 copy_reg(&ms->pmsa_gr[10-1], ms->pmsa_nat_bits, ®s->r10, nat); in finish_pt_regs() 895 finish_pt_regs(struct pt_regs *regs, struct ia64_sal_os_state *sos, unsigned long *nat) finish_pt_regs() argument 982 unsigned long old_unat, old_rnat, new_rnat, nat; ia64_mca_modify_original_stack() local [all...] |
H A D | unaligned.c | 308 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, int nat) in set_rse_reg() argument 342 if (nat) in set_rse_reg() 366 DPRINT("rnat @%p = 0x%lx nat=%d old nat=%ld\n", in set_rse_reg() 367 (void *) rnat_addr, rnats, nat, (rnats >> ia64_rse_slot_num(addr)) & 1); in set_rse_reg() 370 if (nat) in set_rse_reg() 381 get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int *nat) in get_rse_reg() argument 410 if (nat) { in get_rse_reg() 415 *nat = (*rnat_addr & nat_mask) != 0; in get_rse_reg() 434 if (nat) { in get_rse_reg() 454 setreg(unsigned long regnum, unsigned long val, int nat, struct pt_regs *regs) setreg() argument 628 getreg(unsigned long regnum, unsigned long *val, int *nat, struct pt_regs *regs) getreg() argument [all...] |
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
H A D | unwind.h | 86 signed long off : 61; /* NaT word is at loc+nat.off */ 87 } nat; member 199 unw_set_gr (struct unw_frame_info *i, int n, unsigned long v, char nat) in unw_set_gr() argument 201 return unw_access_gr(i, n, &v, &nat, 1); in unw_set_gr() 228 #define unw_get_gr(i,n,v,nat) unw_access_gr(i,n,v,nat,0)
|
/kernel/linux/linux-6.6/arch/ia64/include/asm/ |
H A D | unwind.h | 86 signed long off : 61; /* NaT word is at loc+nat.off */ 87 } nat; member 199 unw_set_gr (struct unw_frame_info *i, int n, unsigned long v, char nat) in unw_set_gr() argument 201 return unw_access_gr(i, n, &v, &nat, 1); in unw_set_gr() 228 #define unw_get_gr(i,n,v,nat) unw_access_gr(i,n,v,nat,0)
|
/kernel/linux/linux-6.6/tools/testing/selftests/netfilter/ |
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_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'
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/bnxt/ |
H A D | bnxt_tc.c | 211 actions->nat.l3_is_ipv4 = true; in bnxt_tc_parse_pedit() 213 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit() 214 actions->nat.l3.ipv4.saddr.s_addr = htonl(val); in bnxt_tc_parse_pedit() 216 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit() 217 actions->nat.l3.ipv4.daddr.s_addr = htonl(val); in bnxt_tc_parse_pedit() 225 netdev_dbg(bp->dev, "nat.src_xlate = %d src IP: %pI4 dst ip : %pI4\n", in bnxt_tc_parse_pedit() 226 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, in bnxt_tc_parse_pedit() 227 &actions->nat.l3.ipv4.daddr); in bnxt_tc_parse_pedit() 232 actions->nat in bnxt_tc_parse_pedit() [all...] |
/kernel/linux/linux-6.6/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() 226 netdev_dbg(bp->dev, "nat.src_xlate = %d src IP: %pI4 dst ip : %pI4\n", 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 in bnxt_tc_parse_pedit() [all...] |
/kernel/linux/linux-5.10/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, in nf_nat_oif_changed() 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() 57 nf_nat_oif_changed(unsigned int hooknum, enum ip_conntrack_info ctinfo, struct nf_conn_nat *nat, const struct net_device *out) nf_nat_oif_changed() argument
|
/kernel/linux/linux-6.6/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, in nf_nat_oif_changed() 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() 57 nf_nat_oif_changed(unsigned int hooknum, enum ip_conntrack_info ctinfo, struct nf_conn_nat *nat, const struct net_device *out) nf_nat_oif_changed() 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);
|
/kernel/linux/linux-5.10/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 | 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...] |
/kernel/linux/linux-6.6/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() 152 "ct_fs_smfs: failed to create matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n", 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()
|