mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
nwfilter: extend schema + add testcase w/ connlimit-above
I am extending the schema with the recently added connlimit-above attribute and adding a test case for it to the test suite.
This commit is contained in:
parent
2aed290ee9
commit
9db01465e5
@ -387,6 +387,11 @@
|
||||
<ref name="sixbitrange"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
<optional>
|
||||
<attribute name="connlimit-above">
|
||||
<ref name="uint16range"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</interleave>
|
||||
</define>
|
||||
|
||||
|
12
tests/nwfilterxml2xmlin/conntrack-test.xml
Normal file
12
tests/nwfilterxml2xmlin/conntrack-test.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<filter name='testcase' chain='root'>
|
||||
<uuid>0a5288ea-612c-834a-6bbf-82a03a1a3244</uuid>
|
||||
<rule action='drop' direction='out' priority='500'>
|
||||
<icmp connlimit-above='1'/>
|
||||
</rule>
|
||||
<rule action='drop' direction='out' priority='500'>
|
||||
<tcp connlimit-above='2'/>
|
||||
</rule>
|
||||
<rule action='accept' direction='out' priority='500'>
|
||||
<all/>
|
||||
</rule>
|
||||
</filter>
|
12
tests/nwfilterxml2xmlout/conntrack-test.xml
Normal file
12
tests/nwfilterxml2xmlout/conntrack-test.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<filter name='testcase' chain='root'>
|
||||
<uuid>0a5288ea-612c-834a-6bbf-82a03a1a3244</uuid>
|
||||
<rule action='drop' direction='out' priority='500'>
|
||||
<icmp connlimit-above='1'/>
|
||||
</rule>
|
||||
<rule action='drop' direction='out' priority='500'>
|
||||
<tcp connlimit-above='2'/>
|
||||
</rule>
|
||||
<rule action='accept' direction='out' priority='500'>
|
||||
<all/>
|
||||
</rule>
|
||||
</filter>
|
@ -119,6 +119,8 @@ mymain(int argc, char **argv)
|
||||
DO_TEST("icmp-direction2-test");
|
||||
DO_TEST("icmp-direction3-test");
|
||||
|
||||
DO_TEST("conntrack-test");
|
||||
|
||||
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user