diff options
author | Florian Westphal <fw@strlen.de> | 2018-04-18 00:09:05 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-04-19 10:18:18 +0200 |
commit | f38ed1e59f8d3b62e322563401cabc6dbac5fca5 (patch) | |
tree | cfeca465d8c624b0c2361e10703796d5e4967138 /iptables | |
parent | 71a6e372f82b6c50c14c8034a974f3ad5983314d (diff) |
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 <fw@strlen.de>
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/xtables-translate.c | 2 |
1 files changed, 1 insertions, 1 deletions
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, |