From b2b811ed4a8261430def40b7d600ccb0f4927492 Mon Sep 17 00:00:00 2001 From: "Pablo M. Bermudo Garay" Date: Mon, 22 Aug 2016 12:56:14 +0200 Subject: xtables-translate: add escape_quotes option to comment_xlate The comment_xlate function was not supporting this option that is necessary in some situations. Signed-off-by: Pablo M. Bermudo Garay Signed-off-by: Pablo Neira Ayuso --- iptables/nft-ipv4.c | 2 +- iptables/nft-ipv6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'iptables') diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index 50706cb0..295dd425 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -490,7 +490,7 @@ static int nft_ipv4_xlate(const void *data, struct xt_xlate *xl) comment = xt_xlate_get_comment(xl); if (comment) - xt_xlate_add(xl, "comment \\\"%s\\\" ", comment); + xt_xlate_add(xl, "comment %s", comment); ret = xlate_action(cs, !!(cs->fw.ip.flags & IPT_F_GOTO), xl); diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 8ca523c8..8bebf6be 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -439,7 +439,7 @@ static int nft_ipv6_xlate(const void *data, struct xt_xlate *xl) comment = xt_xlate_get_comment(xl); if (comment) - xt_xlate_add(xl, "comment \\\"%s\\\" ", comment); + xt_xlate_add(xl, "comment %s", comment); ret = xlate_action(cs, !!(cs->fw6.ipv6.flags & IP6T_F_GOTO), xl); -- cgit v1.2.3