netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] src: Remove expire information from list stateless ruleset.
@ 2017-06-06  6:25 Varsha Rao
  2017-06-06 16:05 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Varsha Rao @ 2017-06-06  6:25 UTC (permalink / raw)
  To: pablo, netfilter-devel

As expires is stateful information. This patch removes expire
information from list stateless ruleset. With nft -s option, the
ruleset will be as following.

table ip firewall {
        set host {
                type ipv4_addr
                flags timeout
                elements = { 10.0.0.2 timeout 10m }
        }
}

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 src/expression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/expression.c b/src/expression.c
index 55dd391..4fef830 100644
--- a/src/expression.c
+++ b/src/expression.c
@@ -962,7 +962,7 @@ static void set_elem_expr_print(const struct expr *expr)
 		printf(" timeout ");
 		time_print(expr->timeout / 1000);
 	}
-	if (expr->expiration) {
+	if (!stateless_output && expr->expiration) {
 		printf(" expires ");
 		time_print(expr->expiration / 1000);
 	}
-- 
2.9.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-06 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06  6:25 [PATCH] src: Remove expire information from list stateless ruleset Varsha Rao
2017-06-06 16:05 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).