netfilter: x_tables: enforce unique and ascending entry points
authorFlorian Westphal <fw@strlen.de>
Tue, 27 Feb 2018 18:42:30 +0000 (19:42 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Mar 2018 22:15:43 +0000 (23:15 +0100)
commite816a2ce49e49e3906f614009c919334a0c6ba6a
tree5951c15ff0023a04646abd9026ee3d117f299119
parent1b293e30f759b03f246baae862bdf35e57b2c39e
netfilter: x_tables: enforce unique and ascending entry points

Harmless from kernel point of view, but iptables assumes that this is
true when decoding a ruleset.

iptables walks the dumped blob from kernel, and, for each entry that
creates a new chain it prints out rule/chain information.
Base chains (hook entry points) are thus only shown when they appear
in the rule blob.  One base chain that is referenced multiple times
in hook blob is then only printed once.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/x_tables.c