From patchwork Mon Aug 12 07:35:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero X-Patchwork-Id: 266448 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 57C102C00A4 for ; Mon, 12 Aug 2013 17:35:45 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754426Ab3HLHfn (ORCPT ); Mon, 12 Aug 2013 03:35:43 -0400 Received: from smtp3.cica.es ([150.214.5.190]:59735 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754266Ab3HLHfn (ORCPT ); Mon, 12 Aug 2013 03:35:43 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id 06D6D51ED7C for ; Mon, 12 Aug 2013 07:35:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id t7Es6VyiOue7 for ; Mon, 12 Aug 2013 09:35:37 +0200 (CEST) Received: from nfdev.cica.es (nfdev.cica.es [IPv6:2a00:9ac0:c1ca:31::220]) by smtp.cica.es (Postfix) with ESMTP id F2B4B51ED78 for ; Mon, 12 Aug 2013 09:35:36 +0200 (CEST) Subject: [libnftables PATCH] chain: xml: delete node To: netfilter-devel@vger.kernel.org From: Arturo Borrero Gonzalez Date: Mon, 12 Aug 2013 09:35:34 +0200 Message-ID: <20130812073534.20663.87896.stgit@nfdev.cica.es> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Since the 'use' attribute in a chain can't be set, ignore it in the XML printing. Signed-off-by: Arturo Borrero Gonzalez --- tests/xmlfiles/10-chain.xml | 2 +- tests/xmlfiles/11-chain.xml | 2 +- tests/xmlfiles/12-chain.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/src/chain.c b/src/chain.c index a6d99ca..e2296d3 100644 --- a/src/chain.c +++ b/src/chain.c @@ -756,11 +756,11 @@ static int nft_chain_snprintf_xml(char *buf, size_t size, struct nft_chain *c) ret = snprintf(buf, size, "%s" "%"PRIu64"%"PRIu64"" "%"PRIu64"%s" - "%s
%d%d" + "%s
%d" "%s", c->name, c->handle, c->bytes, c->packets, c->type, c->table, - c->prio, c->use, hooknum2str_array[c->hooknum]); + c->prio, hooknum2str_array[c->hooknum]); SNPRINTF_BUFFER_SIZE(ret, size, len, offset); /* The parsing will fail both if there are something different diff --git a/tests/xmlfiles/10-chain.xml b/tests/xmlfiles/10-chain.xml index 347626c..e22178a 100644 --- a/tests/xmlfiles/10-chain.xml +++ b/tests/xmlfiles/10-chain.xml @@ -1 +1 @@ -test000filterfilter
01NF_INET_LOCAL_INacceptip
+test000filterfilter
0NF_INET_LOCAL_INacceptip
diff --git a/tests/xmlfiles/11-chain.xml b/tests/xmlfiles/11-chain.xml index beec5ee..41cac4e 100644 --- a/tests/xmlfiles/11-chain.xml +++ b/tests/xmlfiles/11-chain.xml @@ -1 +1 @@ -test0591filterfilter
01NF_INET_FORWARDdropip6
+test0591filterfilter
0NF_INET_FORWARDdropip6
diff --git a/tests/xmlfiles/12-chain.xml b/tests/xmlfiles/12-chain.xml index 9036fa1..040eca4 100644 --- a/tests/xmlfiles/12-chain.xml +++ b/tests/xmlfiles/12-chain.xml @@ -1 +1 @@ -foo100592641549792548796325natnat
01NF_INET_POST_ROUTINGacceptip
+foo100592641549792548796325natnat
0NF_INET_POST_ROUTINGacceptip