From: Louis Sautier Date: Sun, 10 Sep 2017 00:39:51 +0000 (+0200) Subject: xtables-compat-restore: fix translation of mangle's OUTPUT X-Git-Tag: v1.6.2~36 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c633296b49670f44cf448aeb854cfb18167c256;p=thirdparty%2Fiptables.git xtables-compat-restore: fix translation of mangle's OUTPUT This chain should be translated as a route chain, not as a filter chain. Signed-off-by: Pablo Neira Ayuso --- diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index 3e6c7051..4f6a9caf 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -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);