From f38ed1e59f8d3b62e322563401cabc6dbac5fca5 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 18 Apr 2018 00:09:05 +0200 Subject: xt-translate: quote interface names in translated output it its good practice as interface names can be virtually any identifier and could clash with nft keywords. Signed-off-by: Florian Westphal --- iptables/xtables-translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/xtables-translate.c') diff --git a/iptables/xtables-translate.c b/iptables/xtables-translate.c index ecb490f9..78cc60e8 100644 --- a/iptables/xtables-translate.c +++ b/iptables/xtables-translate.c @@ -43,7 +43,7 @@ void xlate_ifname(struct xt_xlate *xl, const char *nftmeta, const char *ifname, if (iface[ifaclen - 1] == '+') iface[ifaclen - 1] = '*'; - xt_xlate_add(xl, "%s %s%s ", nftmeta, invert ? "!= " : "", iface); + xt_xlate_add(xl, "%s %s\"%s\" ", nftmeta, invert ? "!= " : "", iface); } int xlate_action(const struct iptables_command_state *cs, bool goto_set, -- cgit v1.2.3