提交 9db01465 编写于 作者: S Stefan Berger

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.
上级 2aed290e
...@@ -387,6 +387,11 @@ ...@@ -387,6 +387,11 @@
<ref name="sixbitrange"/> <ref name="sixbitrange"/>
</attribute> </attribute>
</optional> </optional>
<optional>
<attribute name="connlimit-above">
<ref name="uint16range"/>
</attribute>
</optional>
</interleave> </interleave>
</define> </define>
......
<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>
<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) ...@@ -119,6 +119,8 @@ mymain(int argc, char **argv)
DO_TEST("icmp-direction2-test"); DO_TEST("icmp-direction2-test");
DO_TEST("icmp-direction3-test"); DO_TEST("icmp-direction3-test");
DO_TEST("conntrack-test");
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE); return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册