LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain'
@ 2018-04-17 22:21 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2018-04-17 22:21 UTC (permalink / raw)
  To: Pablo Neira Ayuso; +Cc: kbuild-all, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 6420 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   a27fc14219f2e3c4a46ba9177b04d9b52c875532
commit: 02c7b25e5f54321b9063e18d4f52cce07f8e081d netfilter: nf_tables: build-in filter chain type
date:   3 weeks ago
config: x86_64-randconfig-s3-04180252 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 02c7b25e5f54321b9063e18d4f52cce07f8e081d
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_nat_do_chain':
>> net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain'
   net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_exit':
>> net/ipv6/netfilter/nft_chain_nat_ipv6.c:94: undefined reference to `nft_unregister_chain_type'
   net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_init':
>> net/ipv6/netfilter/nft_chain_nat_ipv6.c:87: undefined reference to `nft_register_chain_type'

vim +37 net/ipv6/netfilter/nft_chain_nat_ipv6.c

eb31628e3 Tomasz Bursztyka  2013-10-10  26  
06198b34a Eric W. Biederman 2015-09-18  27  static unsigned int nft_nat_do_chain(void *priv,
eb31628e3 Tomasz Bursztyka  2013-10-10  28  				     struct sk_buff *skb,
8fe22382d David S. Miller   2015-04-03  29  				     const struct nf_hook_state *state,
876665eaf Pablo Neira Ayuso 2014-09-09  30  				     struct nf_conn *ct)
eb31628e3 Tomasz Bursztyka  2013-10-10  31  {
eb31628e3 Tomasz Bursztyka  2013-10-10  32  	struct nft_pktinfo pkt;
eb31628e3 Tomasz Bursztyka  2013-10-10  33  
7a4473a31 Pablo Neira Ayuso 2017-12-10  34  	nft_set_pktinfo(&pkt, skb, state);
7a4473a31 Pablo Neira Ayuso 2017-12-10  35  	nft_set_pktinfo_ipv6(&pkt, skb);
eb31628e3 Tomasz Bursztyka  2013-10-10  36  
06198b34a Eric W. Biederman 2015-09-18 @37  	return nft_do_chain(&pkt, priv);
eb31628e3 Tomasz Bursztyka  2013-10-10  38  }
eb31628e3 Tomasz Bursztyka  2013-10-10  39  
06198b34a Eric W. Biederman 2015-09-18  40  static unsigned int nft_nat_ipv6_fn(void *priv,
876665eaf Pablo Neira Ayuso 2014-09-09  41  				    struct sk_buff *skb,
238e54c9c David S. Miller   2015-04-03  42  				    const struct nf_hook_state *state)
876665eaf Pablo Neira Ayuso 2014-09-09  43  {
06198b34a Eric W. Biederman 2015-09-18  44  	return nf_nat_ipv6_fn(priv, skb, state, nft_nat_do_chain);
eb31628e3 Tomasz Bursztyka  2013-10-10  45  }
eb31628e3 Tomasz Bursztyka  2013-10-10  46  
06198b34a Eric W. Biederman 2015-09-18  47  static unsigned int nft_nat_ipv6_in(void *priv,
eb31628e3 Tomasz Bursztyka  2013-10-10  48  				    struct sk_buff *skb,
238e54c9c David S. Miller   2015-04-03  49  				    const struct nf_hook_state *state)
eb31628e3 Tomasz Bursztyka  2013-10-10  50  {
06198b34a Eric W. Biederman 2015-09-18  51  	return nf_nat_ipv6_in(priv, skb, state, nft_nat_do_chain);
eb31628e3 Tomasz Bursztyka  2013-10-10  52  }
eb31628e3 Tomasz Bursztyka  2013-10-10  53  
06198b34a Eric W. Biederman 2015-09-18  54  static unsigned int nft_nat_ipv6_out(void *priv,
eb31628e3 Tomasz Bursztyka  2013-10-10  55  				     struct sk_buff *skb,
238e54c9c David S. Miller   2015-04-03  56  				     const struct nf_hook_state *state)
eb31628e3 Tomasz Bursztyka  2013-10-10  57  {
06198b34a Eric W. Biederman 2015-09-18  58  	return nf_nat_ipv6_out(priv, skb, state, nft_nat_do_chain);
eb31628e3 Tomasz Bursztyka  2013-10-10  59  }
eb31628e3 Tomasz Bursztyka  2013-10-10  60  
06198b34a Eric W. Biederman 2015-09-18  61  static unsigned int nft_nat_ipv6_local_fn(void *priv,
eb31628e3 Tomasz Bursztyka  2013-10-10  62  					  struct sk_buff *skb,
238e54c9c David S. Miller   2015-04-03  63  					  const struct nf_hook_state *state)
eb31628e3 Tomasz Bursztyka  2013-10-10  64  {
06198b34a Eric W. Biederman 2015-09-18  65  	return nf_nat_ipv6_local_fn(priv, skb, state, nft_nat_do_chain);
eb31628e3 Tomasz Bursztyka  2013-10-10  66  }
eb31628e3 Tomasz Bursztyka  2013-10-10  67  
32537e918 Pablo Neira Ayuso 2018-03-27  68  static const struct nft_chain_type nft_chain_nat_ipv6 = {
eb31628e3 Tomasz Bursztyka  2013-10-10  69  	.name		= "nat",
eb31628e3 Tomasz Bursztyka  2013-10-10  70  	.type		= NFT_CHAIN_T_NAT,
fa2c1de0b Patrick McHardy   2014-01-09  71  	.family		= NFPROTO_IPV6,
fa2c1de0b Patrick McHardy   2014-01-09  72  	.owner		= THIS_MODULE,
eb31628e3 Tomasz Bursztyka  2013-10-10  73  	.hook_mask	= (1 << NF_INET_PRE_ROUTING) |
eb31628e3 Tomasz Bursztyka  2013-10-10  74  			  (1 << NF_INET_POST_ROUTING) |
eb31628e3 Tomasz Bursztyka  2013-10-10  75  			  (1 << NF_INET_LOCAL_OUT) |
eb31628e3 Tomasz Bursztyka  2013-10-10  76  			  (1 << NF_INET_LOCAL_IN),
fa2c1de0b Patrick McHardy   2014-01-09  77  	.hooks		= {
876665eaf Pablo Neira Ayuso 2014-09-09  78  		[NF_INET_PRE_ROUTING]	= nft_nat_ipv6_in,
876665eaf Pablo Neira Ayuso 2014-09-09  79  		[NF_INET_POST_ROUTING]	= nft_nat_ipv6_out,
876665eaf Pablo Neira Ayuso 2014-09-09  80  		[NF_INET_LOCAL_OUT]	= nft_nat_ipv6_local_fn,
2a5538e9a Pablo Neira Ayuso 2014-08-25  81  		[NF_INET_LOCAL_IN]	= nft_nat_ipv6_fn,
eb31628e3 Tomasz Bursztyka  2013-10-10  82  	},
eb31628e3 Tomasz Bursztyka  2013-10-10  83  };
eb31628e3 Tomasz Bursztyka  2013-10-10  84  
eb31628e3 Tomasz Bursztyka  2013-10-10  85  static int __init nft_chain_nat_ipv6_init(void)
eb31628e3 Tomasz Bursztyka  2013-10-10  86  {
cc07eeb0e Pablo Neira Ayuso 2018-03-27 @87  	nft_register_chain_type(&nft_chain_nat_ipv6);
eb31628e3 Tomasz Bursztyka  2013-10-10  88  
eb31628e3 Tomasz Bursztyka  2013-10-10  89  	return 0;
eb31628e3 Tomasz Bursztyka  2013-10-10  90  }
eb31628e3 Tomasz Bursztyka  2013-10-10  91  
eb31628e3 Tomasz Bursztyka  2013-10-10  92  static void __exit nft_chain_nat_ipv6_exit(void)
eb31628e3 Tomasz Bursztyka  2013-10-10  93  {
eb31628e3 Tomasz Bursztyka  2013-10-10 @94  	nft_unregister_chain_type(&nft_chain_nat_ipv6);
eb31628e3 Tomasz Bursztyka  2013-10-10  95  }
eb31628e3 Tomasz Bursztyka  2013-10-10  96  

:::::: The code at line 37 was first introduced by commit
:::::: 06198b34a3e09e06d9aecaa3727e0d37206cea77 netfilter: Pass priv instead of nf_hook_ops to netfilter hooks

:::::: TO: Eric W. Biederman <ebiederm@xmission.com>
:::::: CC: Pablo Neira Ayuso <pablo@netfilter.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34574 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-17 22:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17 22:21 net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain' kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).