Re: [PATCH v2] netfilter: nf_tables: delete table via table handle

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

 



Hi Harsha,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on nf/master]
[also build test ERROR on v4.15-rc7 next-20180110]
[cannot apply to nf-next/master]
[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/Harsha-Sharma/netfilter-nf_tables-delete-table-via-table-handle/20180111-153748
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master
config: x86_64-randconfig-u0-01111920 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   net//netfilter/nf_tables_api.c: In function '__nft_table_lookup_byhandle':
   net//netfilter/nf_tables_api.c:375:22: error: 'struct nft_table' has no member named 'handle'
      if (handle == table->handle &&
                         ^
   net//netfilter/nf_tables_api.c: In function 'nf_tables_deltable':
>> net//netfilter/nf_tables_api.c:890:66: error: 'NFTA_TABLE_HANDLE' undeclared (first use in this function)
     if (family == AF_UNSPEC || (nla[NFTA_TABLE_NAME] == NULL && nla[NFTA_TABLE_HANDLE] == NULL))
                                                                     ^
   net//netfilter/nf_tables_api.c:890:66: note: each undeclared identifier is reported only once for each function it appears in

vim +/NFTA_TABLE_HANDLE +890 net//netfilter/nf_tables_api.c

   876	
   877	static int nf_tables_deltable(struct net *net, struct sock *nlsk,
   878				      struct sk_buff *skb, const struct nlmsghdr *nlh,
   879				      const struct nlattr * const nla[],
   880				      struct netlink_ext_ack *extack)
   881	{
   882		const struct nfgenmsg *nfmsg = nlmsg_data(nlh);
   883		u8 genmask = nft_genmask_next(net);
   884		struct nft_af_info *afi;
   885		struct nft_table *table;
   886		int family = nfmsg->nfgen_family;
   887		struct nft_ctx ctx;
   888	
   889		nft_ctx_init(&ctx, net, skb, nlh, NULL, NULL, NULL, nla);
 > 890		if (family == AF_UNSPEC || (nla[NFTA_TABLE_NAME] == NULL && nla[NFTA_TABLE_HANDLE] == NULL))
   891			return nft_flush(&ctx, family);
   892	
   893		afi = nf_tables_afinfo_lookup(net, family, false);
   894		if (IS_ERR(afi))
   895			return PTR_ERR(afi);
   896		if (nla[NFTA_TABLE_HANDLE])
   897			table = nf_tables_table_lookup_byhandle(afi, nla[NFTA_TABLE_HANDLE], genmask);
   898		else
   899			table = nf_tables_table_lookup(afi, nla[NFTA_TABLE_NAME], genmask);
   900	
   901		if (IS_ERR(table))
   902			return PTR_ERR(table);
   903	
   904		if (nlh->nlmsg_flags & NLM_F_NONREC &&
   905		    table->use > 0)
   906			return -EBUSY;
   907	
   908		ctx.afi = afi;
   909		ctx.table = table;
   910	
   911		return nft_flush_table(&ctx);
   912	}
   913	

---
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