Blame SOURCES/0051-rule-limit-don-t-print-default-burst-value.patch

bacbc8
From a06d879ceba6b1ae7b541c223701435a4d1394e1 Mon Sep 17 00:00:00 2001
bacbc8
From: Florian Westphal <fw@strlen.de>
bacbc8
Date: Wed, 4 Jul 2018 15:10:12 +0200
bacbc8
Subject: [PATCH] rule: limit: don't print default burst value
bacbc8
bacbc8
limit http-traffic { rate 1/second } gets printed as
bacbc8
limit http-traffic { rate 1/second burst 5 packets }
bacbc8
bacbc8
caused tests/shell/run-tests.sh tests/shell/testcases/sets/0026named_limit_0
bacbc8
bacbc8
to return 'DUMP FAIL'.
bacbc8
bacbc8
Signed-off-by: Florian Westphal <fw@strlen.de>
bacbc8
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
bacbc8
(cherry picked from commit 1dc9be8445265498a2db534ae254260b6e7dd75b)
bacbc8
Signed-off-by: Phil Sutter <psutter@redhat.com>
bacbc8
---
bacbc8
 src/rule.c | 2 +-
bacbc8
 1 file changed, 1 insertion(+), 1 deletion(-)
bacbc8
bacbc8
diff --git a/src/rule.c b/src/rule.c
bacbc8
index 0b494e4326be6..850b00cfc9874 100644
bacbc8
--- a/src/rule.c
bacbc8
+++ b/src/rule.c
bacbc8
@@ -1472,7 +1472,7 @@ static void obj_print_data(const struct obj *obj,
bacbc8
 			nft_print(octx, "rate %s%" PRIu64 "/%s",
bacbc8
 				  inv ? "over " : "", obj->limit.rate,
bacbc8
 				  get_unit(obj->limit.unit));
bacbc8
-			if (obj->limit.burst > 0)
bacbc8
+			if (obj->limit.burst > 0 && obj->limit.burst != 5)
bacbc8
 				nft_print(octx, " burst %u packets",
bacbc8
 					  obj->limit.burst);
bacbc8
 			break;
bacbc8
-- 
bacbc8
2.21.0
bacbc8