iptables: Test if match and target arguments are also the same
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 12 Feb 2013 09:19:54 +0000 (10:19 +0100)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 12 Feb 2013 10:35:04 +0000 (12:35 +0200)
commit3e95870df42bc69c8a7afae8860fc23a00fba7b4
treea1fcf56006e0c97bf0c2a9f9079ce05e3b24e27c
parent660657415977d73451d81981290c9a922875c6e4
iptables: Test if match and target arguments are also the same

We need to verify that also the arguments are the same, e.g.
if we have two rules like

-t filter -A INPUT -m mark --mark 1 -j LOG
-t filter -A INPUT -m mark --mark 2 -j LOG

then the matcher and the target would be the same without looking
at '1' or '2'.

When deleting a rule, we would always remove the first
rule which matches the 'match' type and target type, so let's have a
look also on the arguments. iptables does it the same way.
src/iptables.c