diff options
author | Arturo Borrero <arturo.borrero.glez@gmail.com> | 2013-07-25 22:44:40 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-07-25 22:55:44 +0200 |
commit | 02295f3d01d13adba9fefeb7b9a40ea379aded1b (patch) | |
tree | 608134747cebe3518cccec8e9b4fc16158cd0503 /tests/xmlfiles/36-rule-real.xml | |
parent | ab12dcd69bc56897f3138d2ead5294f775238166 (diff) |
tests: xml: add realistic XML tests files
This patch refresh current XML testfiles with some realworld
expressions extracted from rules. The nft instruction itself is added
as a comment for future references.
All XMl files are now indented with tabs instead of spaces. Also, a
bunch of new realworld rules with mixed expressions are added.
I used this command to get the XML formatted with tabs:
$ export XMLLINT_INDENT=$'\t'
$ xmllint --format file.xml
The xmllint tool is included in the libxml2-utils package (at least on
debian systems).
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/36-rule-real.xml')
-rw-r--r-- | tests/xmlfiles/36-rule-real.xml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/xmlfiles/36-rule-real.xml b/tests/xmlfiles/36-rule-real.xml new file mode 100644 index 0000000..dd70252 --- /dev/null +++ b/tests/xmlfiles/36-rule-real.xml @@ -0,0 +1,25 @@ +<rule family="ip" table="filter" chain="output" handle="22" version="0"> + <rule_flags>0</rule_flags> + <expr type="payload"> + <dreg>1</dreg> + <offset>12</offset> + <len>8</len> + <base>network</base> + </expr> + <expr type="cmp"> + <sreg>1</sreg> + <op>eq</op> + <cmpdata> + <data_reg type="value"> + <len>8</len> + <data0>0x0100a8c0</data0> + <data1>0x6400a8c0</data1> + </data_reg> + </cmpdata> + </expr> + <expr type="counter"> + <pkts>0</pkts> + <bytes>0</bytes> + </expr> +</rule> +<!-- nft add rule filter INPUT ip saddr 192.168.0.1 ip daddr 192.168.0.100 counter --> |