]> git.ipfire.org Git - thirdparty/iptables.git/commit
nft: cache: Sort custom chains by name
authorPhil Sutter <phil@nwl.cc>
Thu, 30 Jul 2020 08:24:10 +0000 (10:24 +0200)
committerPhil Sutter <phil@nwl.cc>
Mon, 21 Dec 2020 17:33:21 +0000 (18:33 +0100)
commita599efa74dd98c70332428b68970ae0e218600da
treea35fc992f01d1b4f01e3c071a48588c8861154e5
parent176c92c26bfc9b4a36b99c58b66e117fbe5ae706
nft: cache: Sort custom chains by name

With base chains no longer residing in the tables' chain lists, they can
easily be sorted upon insertion. This on one hand aligns custom chain
ordering with legacy iptables and on the other makes it predictable,
which is very helpful when manually comparing ruleset dumps for
instance.

Adjust the one ebtables-nft test case this change breaks (as wrong
ordering is expected in there). The manual output sorting done for tests
which apply to legacy as well as nft is removed in a separate patch.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/nft-cache.c
iptables/tests/shell/testcases/ebtables/0002-ebtables-save-restore_0