From 8a3b2e7327a3057b5976df4af387b8143aad6110 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 25 Jul 2017 20:39:42 +0200 Subject: monitor: Fix printing of set declarations The optional attributes 'flags', 'gc-interval' and 'timeout' have to be delimited by stmt_separator (either newline or semicolon), not 'nl' which is set to whitespace by set_print_plain(). In order to restore readability, change stmt_separator to include a single whitespace after the semicolon. Here's monitor output for the following command: | # nft add set ip t testset { type inet_service; \ | timeout 60s; gc-interval 120s; } Before this patch: | add set ip t testset { type inet_service;timeout 1m gc-interval 2m } With this patch applied: | add set ip t testset { type inet_service; timeout 1m; gc-interval 2m; } Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- tests/monitor/testcases/set-multiple.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/monitor/testcases/set-multiple.t') diff --git a/tests/monitor/testcases/set-multiple.t b/tests/monitor/testcases/set-multiple.t index d94f941b..ce919125 100644 --- a/tests/monitor/testcases/set-multiple.t +++ b/tests/monitor/testcases/set-multiple.t @@ -2,9 +2,9 @@ I add table ip t O add table ip t I add set ip t portrange { type inet_service; flags interval; } -O add set ip t portrange { type inet_service;flags interval } +O add set ip t portrange { type inet_service;flags interval; } I add set ip t portrange2 { type inet_service; flags interval; } -O add set ip t portrange2 { type inet_service;flags interval } +O add set ip t portrange2 { type inet_service;flags interval; } # make sure concurrent adds work I add element ip t portrange { 1024-65535 } -- cgit v1.2.3