From b58cf8947422ba695df80fe3b012b383fff22f7a Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Tue, 6 Aug 2013 10:40:33 +0200 Subject: src: xml: use nodes instead of attributes When working with XML, it's desirable to work with nodes better than attributes. Table/chain/rules had attributes in their XML representation, and this patch transform those to nodes, ie: Before: ip0
After: filterip0
While at it: * There was a lot of redundant code that is now collapsed with the new nft_mxml_family_parse() helper function. * I've added a small fix: additional validation for the name of the current XML object, and also replace raw strtol calls to nft_strtoi. * Also, all XML testfiles are updated to keep passing the parsing tests and mantain the repo in consisten state. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- tests/xmlfiles/27-rule-limit.xml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'tests/xmlfiles/27-rule-limit.xml') diff --git a/tests/xmlfiles/27-rule-limit.xml b/tests/xmlfiles/27-rule-limit.xml index 7fa6963..7596429 100644 --- a/tests/xmlfiles/27-rule-limit.xml +++ b/tests/xmlfiles/27-rule-limit.xml @@ -1,7 +1,11 @@ - - 0 - - 123123 - 321321 - + + ip + filter
+ INPUT + 100 + 0 + + 123123 + 321321 +
-- cgit v1.2.3