Re: [PATCH nf-next,v2 3/3] netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pablo,

I love your patch! Yet something to improve:

[auto build test ERROR on nf-next/master]
[also build test ERROR on v4.17-rc5]
[cannot apply to nf/master next-20180516]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/netfilter-add-struct-nf_ct_hook-and-use-it/20180515-215248
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-acpi-redef (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   net/netfilter/nfnetlink_queue.c: In function 'nfqnl_reinject':
>> net/netfilter/nfnetlink_queue.c:237:7: error: implicit declaration of function 'nf_ct_get'; did you mean 'sk_dst_get'? [-Werror=implicit-function-declaration]
     ct = nf_ct_get(entry->skb, &ctinfo);
          ^~~~~~~~~
          sk_dst_get
>> net/netfilter/nfnetlink_queue.c:237:5: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
     ct = nf_ct_get(entry->skb, &ctinfo);
        ^
>> net/netfilter/nfnetlink_queue.c:238:13: error: implicit declaration of function 'nf_ct_is_confirmed'; did you mean 'sk_dst_confirm'? [-Werror=implicit-function-declaration]
     if (ct && !nf_ct_is_confirmed(ct) &&
                ^~~~~~~~~~~~~~~~~~
                sk_dst_confirm
   cc1: some warnings being treated as errors

vim +237 net/netfilter/nfnetlink_queue.c

   229	
   230	static void nfqnl_reinject(struct nf_queue_entry *entry, unsigned int verdict)
   231	{
   232		enum ip_conntrack_info ctinfo;
   233		struct nf_ct_hook *ct_hook;
   234		struct nf_conn *ct;
   235		int err;
   236	
 > 237		ct = nf_ct_get(entry->skb, &ctinfo);
 > 238		if (ct && !nf_ct_is_confirmed(ct) &&
   239		    (verdict == NF_ACCEPT || verdict == NF_STOP)) {
   240			rcu_read_lock();
   241			ct_hook = rcu_dereference(nf_ct_hook);
   242			if (ct_hook) {
   243				err = ct_hook->update(entry->state.net, entry->skb,
   244						      ct, ctinfo);
   245				if (err < 0)
   246					verdict = NF_DROP;
   247			}
   248			rcu_read_unlock();
   249		}
   250	
   251		nf_reinject(entry, verdict);
   252	}
   253	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux