src: Remove expire information from list stateless ruleset.
PATCH 1/1 src: Remove expire information from list stateless ruleset.
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 <[email protected]>
--- src/expression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/expression.c +1 -1
@@ -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 ); }
Signature · 1 line
2.9.4
Quoted 11 lines · Varsha Rao
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 } } }
Applied, thanks Varsha.
Congrats, your first patch to nftables is in.