summaryrefslogtreecommitdiffstats
path: root/tests/xmlfiles/27-rule-limit.xml
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>2013-08-06 10:40:33 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-08-06 11:44:20 +0200
commitb58cf8947422ba695df80fe3b012b383fff22f7a (patch)
treeed5708d68972c225492771b57397c52bfef1fc4d /tests/xmlfiles/27-rule-limit.xml
parentec75831c439ebd3475e0ba6766188d963538129a (diff)
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: <table name="filter"> <family>ip</family> <table_flags>0</table_flags> </table> After: <table> <name>filter</name> <family>ip</family> <table_flags>0</table_flags> </table> 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 <arturo.borrero.glez@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/xmlfiles/27-rule-limit.xml')
-rw-r--r--tests/xmlfiles/27-rule-limit.xml16
1 files changed, 10 insertions, 6 deletions
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 @@
-<rule family="ip" table="filter" chain="INPUT" handle="100">
- <rule_flags>0</rule_flags>
- <expr type="limit">
- <rate>123123</rate>
- <depth>321321</depth>
- </expr>
+<rule>
+ <family>ip</family>
+ <table>filter</table>
+ <chain>INPUT</chain>
+ <handle>100</handle>
+ <rule_flags>0</rule_flags>
+ <expr type="limit">
+ <rate>123123</rate>
+ <depth>321321</depth>
+ </expr>
</rule>