From patchwork Mon Oct 7 09:58:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Bursztyka X-Patchwork-Id: 281052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0CE002C00A7 for ; Mon, 7 Oct 2013 20:58:11 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755261Ab3JGJ6I (ORCPT ); Mon, 7 Oct 2013 05:58:08 -0400 Received: from mga02.intel.com ([134.134.136.20]:3502 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755255Ab3JGJ6H (ORCPT ); Mon, 7 Oct 2013 05:58:07 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 07 Oct 2013 02:58:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1049,1371106800"; d="scan'208";a="388922410" Received: from rd-180.fi.intel.com ([10.237.68.49]) by orsmga001.jf.intel.com with ESMTP; 07 Oct 2013 02:58:05 -0700 From: Tomasz Bursztyka To: netfilter-devel@vger.kernel.org Cc: Tomasz Bursztyka Subject: [nftables kernel - PATCH 2/2] netfilter: nf_tables: Fix the netlink attributes policy for chain Date: Mon, 7 Oct 2013 12:58:00 +0300 Message-Id: <1381139880-20311-3-git-send-email-tomasz.bursztyka@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1381139880-20311-1-git-send-email-tomasz.bursztyka@linux.intel.com> References: <1381139880-20311-1-git-send-email-tomasz.bursztyka@linux.intel.com> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org - Reorder them as they appear in enum nft_chain_attributes - Add NFTA_CHAIN_COUNTERS Signed-off-by: Tomasz Bursztyka --- net/netfilter/nf_tables_api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 7cab11d..dcddc49 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -520,13 +520,14 @@ static struct nft_chain *nf_tables_chain_lookup(const struct nft_table *table, } static const struct nla_policy nft_chain_policy[NFTA_CHAIN_MAX + 1] = { + [NFTA_CHAIN_TABLE] = { .type = NLA_STRING }, [NFTA_CHAIN_HANDLE] = { .type = NLA_U64 }, [NFTA_CHAIN_NAME] = { .type = NLA_STRING, .len = NFT_CHAIN_MAXNAMELEN - 1 }, - [NFTA_CHAIN_TABLE] = { .type = NLA_STRING }, [NFTA_CHAIN_HOOK] = { .type = NLA_NESTED }, [NFTA_CHAIN_POLICY] = { .type = NLA_U32 }, [NFTA_CHAIN_TYPE] = { .type = NLA_NUL_STRING }, + [NFTA_CHAIN_COUNTERS] = { .type = NLA_NESTED }, }; static const struct nla_policy nft_hook_policy[NFTA_HOOK_MAX + 1] = {