]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
monitor: Quote device names in chain declarations, too
authorPhil Sutter <phil@nwl.cc>
Thu, 28 Aug 2025 14:47:03 +0000 (16:47 +0200)
committerPhil Sutter <phil@nwl.cc>
Tue, 2 Sep 2025 10:56:44 +0000 (12:56 +0200)
Fixed commit missed the fact that there are two routines printing chain
declarations.

Fixes: eb30f236d91a8 ("rule: print chain and flowtable devices in quotes")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/rule.c

index ceb56488d37f6734b78b5c298e71eac68a3930ea..d0a62a3ee002d3b199c1ec263f68649f49fa2860 100644 (file)
@@ -1131,7 +1131,7 @@ void chain_print_plain(const struct chain *chain, struct output_ctx *octx)
 
                        nft_print(octx, "devices = { ");
                        for (i = 0; i < chain->dev_array_len; i++) {
-                               nft_print(octx, "%s", chain->dev_array[i]);
+                               nft_print(octx, "\"%s\"", chain->dev_array[i]);
                                if (i + 1 != chain->dev_array_len)
                                        nft_print(octx, ", ");
                        }