]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables-translate: fix issue with quotes
authorPablo M. Bermudo Garay <pablombg@gmail.com>
Tue, 26 Jul 2016 16:45:24 +0000 (18:45 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 27 Jul 2016 11:56:51 +0000 (13:56 +0200)
commit68c57e809f69108694cce2d502a3ed1c328d13e8
tree862c9d4e3cc4a15d9f800d98f9757eaea694a255
parent6604bc6131bf059bce458040ed6b93bcd37fb635
xtables-translate: fix issue with quotes

Some translations included escaped quotes when they were called from
nft:

$ sudo nft list ruleset
table ip mangle {
    chain FORWARD {
        type filter hook forward priority -150; policy accept;
        ct helper \"ftp\" counter packets 0 bytes 0
                  ^^   ^^
    }
}

This behavior is only correct when xlate functions are called from a
xtables-translate command. This patch solves that issue using a new
parameter (escape_quotes) in the xlate functions.

Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libip6t_LOG.c
extensions/libipt_LOG.c
extensions/libxt_NFLOG.c
extensions/libxt_helper.c
include/xtables.h
iptables/xtables-translate.c