]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables-compat-restore: fix translation of mangle's OUTPUT
authorLouis Sautier <sautier.louis@gmail.com>
Sun, 10 Sep 2017 00:39:51 +0000 (02:39 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 10 Sep 2017 20:04:18 +0000 (22:04 +0200)
This chain should be translated as a route chain, not as a filter chain.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xtables-translate.c

index 3e6c7051d2f80000997d68f7fdd9d7731549284c..4f6a9caf72e04f20d542d1f52c2773c85d83dd6b 100644 (file)
@@ -357,6 +357,8 @@ static int xlate_chain_set(struct nft_handle *h, const char *table,
 
        if (strcmp(table, "nat") == 0)
                type = "nat";
+       else if (strcmp(table, "mangle") == 0 && strcmp(chain, "OUTPUT") == 0)
+               type = "route";
 
        printf("add chain %s %s %s { type %s ",
               family2str[h->family], table, chain, type);