]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libebt_redirect: Fix for wrong syntax in translation
authorPhil Sutter <phil@nwl.cc>
Tue, 31 Jan 2023 22:32:50 +0000 (23:32 +0100)
committerPhil Sutter <phil@nwl.cc>
Fri, 17 Feb 2023 17:18:48 +0000 (18:18 +0100)
Meta key comes before 'set' in meta statement.

Fixes: 24ce7465056ae ("ebtables-compat: add redirect match extension")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libebt_redirect.c
extensions/libebt_redirect.txlate

index 389f3ccb53f6016f47d113b31ad03b90efd09cd9..7821935e137aa67216f234565a7bdeaa0a2933c9 100644 (file)
@@ -83,7 +83,7 @@ static int brredir_xlate(struct xt_xlate *xl,
 {
        const struct ebt_redirect_info *red = (const void*)params->target->data;
 
-       xt_xlate_add(xl, "meta set pkttype host");
+       xt_xlate_add(xl, "meta pkttype set host");
        if (red->target != EBT_CONTINUE)
                xt_xlate_add(xl, " %s ", brredir_verdict(red->target));
        return 1;
index f0dd5deaf640642d07712c514a9f31c46ab6d7d9..d073ec774c4fa817e48422fb99aaf095dd9eab65 100644 (file)
@@ -1,8 +1,8 @@
 ebtables-translate -t nat -A PREROUTING -d de:ad:00:00:be:ef -j redirect
-nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta set pkttype host accept'
+nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta pkttype set host accept'
 
 ebtables-translate -t nat -A PREROUTING -d de:ad:00:00:be:ef -j redirect --redirect-target RETURN
-nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta set pkttype host return'
+nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta pkttype set host return'
 
 ebtables-translate -t nat -A PREROUTING -d de:ad:00:00:be:ef -j redirect --redirect-target CONTINUE
-nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta set pkttype host'
+nft 'add rule bridge nat PREROUTING ether daddr de:ad:00:00:be:ef counter meta pkttype set host'