* [linux-next:master 2540/2827] net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'
@ 2024-01-30 18:49 kernel test robot
2024-02-05 1:47 ` Liu, Yujie
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-01-30 18:49 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Florian Westphal <fw@strlen.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52
commit: a9525c7f6219cee9284c0031c5930e8d41384677 [2540/2827] netfilter: xtables: allow xtables-nft only builds
:::::: branch date: 16 hours ago
:::::: commit date: 28 hours ago
config: i386-randconfig-061-20240130 (https://download.01.org/0day-ci/archive/20240131/202401310217.MOObXEB0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/202401310217.MOObXEB0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202401310217.MOObXEB0-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: net/ipv4/netfilter/iptable_nat.o: in function `iptable_nat_table_init':
>> net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'
>> ld: net/ipv4/netfilter/iptable_nat.c:115: undefined reference to `ipt_register_table'
>> ld: net/ipv4/netfilter/iptable_nat.c:123: undefined reference to `ipt_unregister_table_exit'
ld: net/ipv4/netfilter/iptable_nat.o: in function `iptable_nat_net_exit':
>> net/ipv4/netfilter/iptable_nat.c:136: undefined reference to `ipt_unregister_table_exit'
>> ld: net/ipv4/netfilter/iptable_nat.o:net/ipv4/netfilter/iptable_nat.c:32: undefined reference to `ipt_do_table'
>> ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x18): undefined reference to `ipt_do_table'
ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x30): undefined reference to `ipt_do_table'
ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x48): undefined reference to `ipt_do_table'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for IP6_NF_IPTABLES_LEGACY
Depends on [m]: NET [=y] && INET [=y] && IPV6 [=m] && NETFILTER [=y]
Selected by [y]:
- IP_NF_NAT [=y] && NET [=y] && INET [=y] && NETFILTER [=y] && IP_NF_IPTABLES [=y] && NF_CONNTRACK [=y]
vim +111 net/ipv4/netfilter/iptable_nat.c
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 31
591bb2789bc2a9 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2017-07-26 @32 static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 33 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 34 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 35 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 36 .hooknum = NF_INET_PRE_ROUTING,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 37 .priority = NF_IP_PRI_NAT_DST,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 38 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 39 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 40 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 41 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 42 .hooknum = NF_INET_POST_ROUTING,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 43 .priority = NF_IP_PRI_NAT_SRC,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 44 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 45 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 46 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 47 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 48 .hooknum = NF_INET_LOCAL_OUT,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 49 .priority = NF_IP_PRI_NAT_DST,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 50 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 51 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 52 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 53 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 54 .hooknum = NF_INET_LOCAL_IN,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 55 .priority = NF_IP_PRI_NAT_SRC,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 56 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 57 };
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 58
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 59 static int ipt_nat_register_lookups(struct net *net)
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 60 {
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 61 struct iptable_nat_pernet *xt_nat_net;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 62 struct nf_hook_ops *ops;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 63 struct xt_table *table;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 64 int i, ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 65
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 66 xt_nat_net = net_generic(net, iptable_nat_net_id);
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 67 table = xt_find_table(net, NFPROTO_IPV4, "nat");
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 68 if (WARN_ON_ONCE(!table))
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 69 return -ENOENT;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 70
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 71 ops = kmemdup(nf_nat_ipv4_ops, sizeof(nf_nat_ipv4_ops), GFP_KERNEL);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 72 if (!ops)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 73 return -ENOMEM;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 74
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 75 for (i = 0; i < ARRAY_SIZE(nf_nat_ipv4_ops); i++) {
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 76 ops[i].priv = table;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 77 ret = nf_nat_ipv4_register_fn(net, &ops[i]);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 78 if (ret) {
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 79 while (i)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 80 nf_nat_ipv4_unregister_fn(net, &ops[--i]);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 81
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 82 kfree(ops);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 83 return ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 84 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 85 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 86
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 87 xt_nat_net->nf_nat_ops = ops;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 88 return 0;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 89 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 90
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 91 static void ipt_nat_unregister_lookups(struct net *net)
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 92 {
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 93 struct iptable_nat_pernet *xt_nat_net = net_generic(net, iptable_nat_net_id);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 94 struct nf_hook_ops *ops = xt_nat_net->nf_nat_ops;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 95 int i;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 96
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 97 if (!ops)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 98 return;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 99
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 100 for (i = 0; i < ARRAY_SIZE(nf_nat_ipv4_ops); i++)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 101 nf_nat_ipv4_unregister_fn(net, &ops[i]);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 102
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 103 kfree(ops);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 104 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 105
fdacd57c79b79a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-08-03 106 static int iptable_nat_table_init(struct net *net)
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 107 {
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 108 struct ipt_replace *repl;
a67dd266adf42a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2016-02-25 109 int ret;
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 110
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 @111 repl = ipt_alloc_initial_table(&nf_nat_ipv4_table);
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 112 if (repl == NULL)
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 113 return -ENOMEM;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 114
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @115 ret = ipt_register_table(net, &nf_nat_ipv4_table, repl, NULL);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 116 if (ret < 0) {
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 117 kfree(repl);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 118 return ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 119 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 120
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 121 ret = ipt_nat_register_lookups(net);
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 122 if (ret < 0)
20a9df33594fe6 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @123 ipt_unregister_table_exit(net, "nat");
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 124
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 125 kfree(repl);
a67dd266adf42a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2016-02-25 126 return ret;
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 127 }
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 128
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 129 static void __net_exit iptable_nat_net_pre_exit(struct net *net)
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 130 {
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 131 ipt_nat_unregister_lookups(net);
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 132 }
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 133
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 134 static void __net_exit iptable_nat_net_exit(struct net *net)
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 135 {
20a9df33594fe6 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @136 ipt_unregister_table_exit(net, "nat");
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 137 }
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 138
:::::: The code at line 111 was first introduced by commit
:::::: c7232c9979cba684c50b64c513c4a83c9aa70563 netfilter: add protocol independent NAT core
:::::: TO: Patrick McHardy <kaber@trash.net>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [linux-next:master 2540/2827] net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'
2024-01-30 18:49 [linux-next:master 2540/2827] net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table' kernel test robot
@ 2024-02-05 1:47 ` Liu, Yujie
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yujie @ 2024-02-05 1:47 UTC (permalink / raw)
To: lkp, oe-kbuild@lists.linux.dev
not_report
duplicate to https://lore.kernel.org/all/202402011430.vDOuYPku-lkp@intel.com/
-----Original Message-----
From: lkp <lkp@intel.com>
Sent: Wednesday, January 31, 2024 02:49
To: oe-kbuild@lists.linux.dev
Cc: lkp <lkp@intel.com>
Subject: [linux-next:master 2540/2827] net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'
::::::
:::::: Manual check reason: "low confidence static check first_new_problem: net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Florian Westphal <fw@strlen.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 41d66f96d0f15a0a2ad6fa2208f6bac1a66cbd52
commit: a9525c7f6219cee9284c0031c5930e8d41384677 [2540/2827] netfilter: xtables: allow xtables-nft only builds
:::::: branch date: 16 hours ago
:::::: commit date: 28 hours ago
config: i386-randconfig-061-20240130 (https://download.01.org/0day-ci/archive/20240131/202401310217.MOObXEB0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240131/202401310217.MOObXEB0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202401310217.MOObXEB0-lkp@intel.com/
All errors (new ones prefixed by >>):
ld: net/ipv4/netfilter/iptable_nat.o: in function `iptable_nat_table_init':
>> net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table'
>> ld: net/ipv4/netfilter/iptable_nat.c:115: undefined reference to `ipt_register_table'
>> ld: net/ipv4/netfilter/iptable_nat.c:123: undefined reference to `ipt_unregister_table_exit'
ld: net/ipv4/netfilter/iptable_nat.o: in function `iptable_nat_net_exit':
>> net/ipv4/netfilter/iptable_nat.c:136: undefined reference to `ipt_unregister_table_exit'
>> ld: net/ipv4/netfilter/iptable_nat.o:net/ipv4/netfilter/iptable_nat.c:32: undefined reference to `ipt_do_table'
>> ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x18): undefined reference to `ipt_do_table'
ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x30): undefined reference to `ipt_do_table'
ld: net/ipv4/netfilter/iptable_nat.o:(.rodata+0x48): undefined reference to `ipt_do_table'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for IP6_NF_IPTABLES_LEGACY
Depends on [m]: NET [=y] && INET [=y] && IPV6 [=m] && NETFILTER [=y]
Selected by [y]:
- IP_NF_NAT [=y] && NET [=y] && INET [=y] && NETFILTER [=y] && IP_NF_IPTABLES [=y] && NF_CONNTRACK [=y]
vim +111 net/ipv4/netfilter/iptable_nat.c
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 31
591bb2789bc2a9 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2017-07-26 @32 static const struct nf_hook_ops nf_nat_ipv4_ops[] = {
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 33 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 34 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 35 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 36 .hooknum = NF_INET_PRE_ROUTING,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 37 .priority = NF_IP_PRI_NAT_DST,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 38 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 39 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 40 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 41 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 42 .hooknum = NF_INET_POST_ROUTING,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 43 .priority = NF_IP_PRI_NAT_SRC,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 44 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 45 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 46 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 47 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 48 .hooknum = NF_INET_LOCAL_OUT,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 49 .priority = NF_IP_PRI_NAT_DST,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 50 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 51 {
8844e01062ddd8 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-10-11 52 .hook = ipt_do_table,
24c232d8e911ef net/ipv4/netfilter/nf_nat_standalone.c Jan Engelhardt 2009-06-13 53 .pf = NFPROTO_IPV4,
6e23ae2a48750b net/ipv4/netfilter/nf_nat_standalone.c Patrick McHardy 2007-11-19 54 .hooknum = NF_INET_LOCAL_IN,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 55 .priority = NF_IP_PRI_NAT_SRC,
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 56 },
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 57 };
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 58
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 59 static int ipt_nat_register_lookups(struct net *net)
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 60 {
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 61 struct iptable_nat_pernet *xt_nat_net;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 62 struct nf_hook_ops *ops;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 63 struct xt_table *table;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 64 int i, ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 65
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 66 xt_nat_net = net_generic(net, iptable_nat_net_id);
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 67 table = xt_find_table(net, NFPROTO_IPV4, "nat");
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 68 if (WARN_ON_ONCE(!table))
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 69 return -ENOENT;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 70
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 71 ops = kmemdup(nf_nat_ipv4_ops, sizeof(nf_nat_ipv4_ops), GFP_KERNEL);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 72 if (!ops)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 73 return -ENOMEM;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 74
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 75 for (i = 0; i < ARRAY_SIZE(nf_nat_ipv4_ops); i++) {
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 76 ops[i].priv = table;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 77 ret = nf_nat_ipv4_register_fn(net, &ops[i]);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 78 if (ret) {
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 79 while (i)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 80 nf_nat_ipv4_unregister_fn(net, &ops[--i]);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 81
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 82 kfree(ops);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 83 return ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 84 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 85 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 86
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 87 xt_nat_net->nf_nat_ops = ops;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 88 return 0;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 89 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 90
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 91 static void ipt_nat_unregister_lookups(struct net *net)
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 92 {
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 93 struct iptable_nat_pernet *xt_nat_net = net_generic(net, iptable_nat_net_id);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 94 struct nf_hook_ops *ops = xt_nat_net->nf_nat_ops;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 95 int i;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 96
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 97 if (!ops)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 98 return;
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 99
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 100 for (i = 0; i < ARRAY_SIZE(nf_nat_ipv4_ops); i++)
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 101 nf_nat_ipv4_unregister_fn(net, &ops[i]);
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 102
a4aeafa28cf706 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 103 kfree(ops);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 104 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 105
fdacd57c79b79a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-08-03 106 static int iptable_nat_table_init(struct net *net)
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 107 {
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 108 struct ipt_replace *repl;
a67dd266adf42a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2016-02-25 109 int ret;
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 110
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 @111 repl = ipt_alloc_initial_table(&nf_nat_ipv4_table);
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 112 if (repl == NULL)
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 113 return -ENOMEM;
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 114
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @115 ret = ipt_register_table(net, &nf_nat_ipv4_table, repl, NULL);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 116 if (ret < 0) {
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 117 kfree(repl);
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 118 return ret;
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 119 }
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 120
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 121 ret = ipt_nat_register_lookups(net);
ae689334225ff0 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 122 if (ret < 0)
20a9df33594fe6 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @123 ipt_unregister_table_exit(net, "nat");
9971a514ed2697 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2018-05-14 124
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 125 kfree(repl);
a67dd266adf42a net/ipv4/netfilter/iptable_nat.c Florian Westphal 2016-02-25 126 return ret;
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 127 }
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 128
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 129 static void __net_exit iptable_nat_net_pre_exit(struct net *net)
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 130 {
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 131 ipt_nat_unregister_lookups(net);
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 132 }
cf4cbc610bfa29 net/ipv4/netfilter/iptable_nat.c David Wilder 2020-06-22 133
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 134 static void __net_exit iptable_nat_net_exit(struct net *net)
c7232c9979cba6 net/ipv4/netfilter/iptable_nat.c Patrick McHardy 2012-08-26 135 {
20a9df33594fe6 net/ipv4/netfilter/iptable_nat.c Florian Westphal 2021-04-21 @136 ipt_unregister_table_exit(net, "nat");
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 137 }
5b1158e909ecbe net/ipv4/netfilter/nf_nat_standalone.c Jozsef Kadlecsik 2006-12-02 138
:::::: The code at line 111 was first introduced by commit
:::::: c7232c9979cba684c50b64c513c4a83c9aa70563 netfilter: add protocol independent NAT core
:::::: TO: Patrick McHardy <kaber@trash.net>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-05 1:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-30 18:49 [linux-next:master 2540/2827] net/ipv4/netfilter/iptable_nat.c:111: undefined reference to `ipt_alloc_initial_table' kernel test robot
2024-02-05 1:47 ` Liu, Yujie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.