summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-01-09 23:26:05 +0100
committerFlorian Westphal <fw@strlen.de>2019-01-09 23:32:02 +0100
commitb338244abc7f018d79a95657fff88eadee7e9f6b (patch)
treebb8c96da078f7ad42d2d58b999310bef76d78395 /src/rule.c
parentbad27ca386276e64cd7a27abf3417b8a4be20fa4 (diff)
src: fix netdev family device name parsing
Should use accept/use quotes, else you can't use this with a device name that is shared with a key word, e.g. 'device vm'. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rule.c b/src/rule.c
index e15a20b3..73b78c75 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -1070,7 +1070,7 @@ static void chain_print_declaration(const struct chain *chain,
nft_print(octx, "\t\ttype %s hook %s", chain->type,
hooknum2str(chain->handle.family, chain->hooknum));
if (chain->dev != NULL)
- nft_print(octx, " device %s", chain->dev);
+ nft_print(octx, " device \"%s\"", chain->dev);
nft_print(octx, " priority %s; policy %s;\n",
prio2str(octx, priobuf, sizeof(priobuf),
chain->handle.family, chain->hooknum,