net/ipv4/netfilter/nft_chain_nat_ipv4.c:39: undefined reference to `nft_do_chain'
From: kbuild test robot
Date: Wed May 23 2018 - 21:52:16 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bee797529d7c1ea4e2803fda067d20edbc00bc3d
commit: 02c7b25e5f54321b9063e18d4f52cce07f8e081d netfilter: nf_tables: build-in filter chain type
date: 8 weeks ago
config: x86_64-randconfig-s0-05240812 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 02c7b25e5f54321b9063e18d4f52cce07f8e081d
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
net/ipv4/netfilter/nft_chain_nat_ipv4.o: In function `nft_nat_do_chain':
>> net/ipv4/netfilter/nft_chain_nat_ipv4.c:39: undefined reference to `nft_do_chain'
net/ipv4/netfilter/nft_chain_nat_ipv4.o: In function `nft_chain_nat_exit':
>> net/ipv4/netfilter/nft_chain_nat_ipv4.c:96: undefined reference to `nft_unregister_chain_type'
net/ipv4/netfilter/nft_chain_nat_ipv4.o: In function `nft_chain_nat_init':
>> net/ipv4/netfilter/nft_chain_nat_ipv4.c:89: undefined reference to `nft_register_chain_type'
vim +39 net/ipv4/netfilter/nft_chain_nat_ipv4.c
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 28
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 29 static unsigned int nft_nat_do_chain(void *priv,
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 30 struct sk_buff *skb,
d7cf4081 net/ipv4/netfilter/nft_chain_nat_ipv4.c David S. Miller 2015-04-03 31 const struct nf_hook_state *state,
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 32 struct nf_conn *ct)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 33 {
0ca743a5 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-14 34 struct nft_pktinfo pkt;
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 35
7a4473a3 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2017-12-10 36 nft_set_pktinfo(&pkt, skb, state);
7a4473a3 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2017-12-10 37 nft_set_pktinfo_ipv4(&pkt, skb);
0ca743a5 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-14 38
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 @39 return nft_do_chain(&pkt, priv);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 40 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 41
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 42 static unsigned int nft_nat_ipv4_fn(void *priv,
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 43 struct sk_buff *skb,
238e54c9 net/ipv4/netfilter/nft_chain_nat_ipv4.c David S. Miller 2015-04-03 44 const struct nf_hook_state *state)
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 45 {
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 46 return nf_nat_ipv4_fn(priv, skb, state, nft_nat_do_chain);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 47 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 48
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 49 static unsigned int nft_nat_ipv4_in(void *priv,
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 50 struct sk_buff *skb,
238e54c9 net/ipv4/netfilter/nft_chain_nat_ipv4.c David S. Miller 2015-04-03 51 const struct nf_hook_state *state)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 52 {
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 53 return nf_nat_ipv4_in(priv, skb, state, nft_nat_do_chain);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 54 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 55
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 56 static unsigned int nft_nat_ipv4_out(void *priv,
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 57 struct sk_buff *skb,
238e54c9 net/ipv4/netfilter/nft_chain_nat_ipv4.c David S. Miller 2015-04-03 58 const struct nf_hook_state *state)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 59 {
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 60 return nf_nat_ipv4_out(priv, skb, state, nft_nat_do_chain);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 61 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 62
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 63 static unsigned int nft_nat_ipv4_local_fn(void *priv,
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 64 struct sk_buff *skb,
238e54c9 net/ipv4/netfilter/nft_chain_nat_ipv4.c David S. Miller 2015-04-03 65 const struct nf_hook_state *state)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 66 {
06198b34 net/ipv4/netfilter/nft_chain_nat_ipv4.c Eric W. Biederman 2015-09-18 67 return nf_nat_ipv4_local_fn(priv, skb, state, nft_nat_do_chain);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 68 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 69
32537e91 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2018-03-27 70 static const struct nft_chain_type nft_chain_nat_ipv4 = {
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 71 .name = "nat",
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 72 .type = NFT_CHAIN_T_NAT,
fa2c1de0 net/ipv4/netfilter/nft_chain_nat_ipv4.c Patrick McHardy 2014-01-09 73 .family = NFPROTO_IPV4,
fa2c1de0 net/ipv4/netfilter/nft_chain_nat_ipv4.c Patrick McHardy 2014-01-09 74 .owner = THIS_MODULE,
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 75 .hook_mask = (1 << NF_INET_PRE_ROUTING) |
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 76 (1 << NF_INET_POST_ROUTING) |
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 77 (1 << NF_INET_LOCAL_OUT) |
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 78 (1 << NF_INET_LOCAL_IN),
fa2c1de0 net/ipv4/netfilter/nft_chain_nat_ipv4.c Patrick McHardy 2014-01-09 79 .hooks = {
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 80 [NF_INET_PRE_ROUTING] = nft_nat_ipv4_in,
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 81 [NF_INET_POST_ROUTING] = nft_nat_ipv4_out,
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 82 [NF_INET_LOCAL_OUT] = nft_nat_ipv4_local_fn,
65cd90ac net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2014-08-05 83 [NF_INET_LOCAL_IN] = nft_nat_ipv4_fn,
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 84 },
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 85 };
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 86
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 87 static int __init nft_chain_nat_init(void)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 88 {
cc07eeb0 net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2018-03-27 @89 nft_register_chain_type(&nft_chain_nat_ipv4);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 90
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 91 return 0;
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 92 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 93
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 94 static void __exit nft_chain_nat_exit(void)
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 95 {
9370761c net/ipv4/netfilter/nft_chain_nat_ipv4.c Pablo Neira Ayuso 2013-10-10 @96 nft_unregister_chain_type(&nft_chain_nat_ipv4);
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 97 }
96518518 net/ipv4/netfilter/nf_table_nat_ipv4.c Patrick McHardy 2013-10-14 98
:::::: The code at line 39 was first introduced by commit
:::::: 06198b34a3e09e06d9aecaa3727e0d37206cea77 netfilter: Pass priv instead of nf_hook_ops to netfilter hooks
:::::: TO: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
:::::: CC: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip