@@ -4609,11 +4609,6 @@ set_elem_stmt : COUNTER close_scope_counter
}
| LIMIT RATE limit_mode limit_rate_bytes limit_burst_bytes close_scope_limit
{
- if ($5 == 0) {
- erec_queue(error(&@6, "limit burst must be > 0"),
- state->msgs);
- YYERROR;
- }
$$ = limit_stmt_alloc(&@$);
$$->limit.rate = $4.rate;
$$->limit.unit = $4.unit;
new file mode 100644
@@ -0,0 +1,7 @@
+table netdev filter {
+ set test123 {
+ typeof ip saddr
+ limit rate over 1 mbytes/second
+ elements = { 1.2.3.4 limit rate over 1 mbytes/second }
+ }
+}
new file mode 100755
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+## requires EXPR
+
+set -e
+
+RULESET="table netdev filter {
+ set test123 {
+ typeof ip saddr
+ limit rate over 1024 kbytes/second
+ elements = { 1.2.3.4 limit rate over 1024 kbytes/second }
+ }
+}"
+
+$NFT -f - <<< $RULESET
+
+(echo "flush ruleset netdev"; $NFT --stateless list ruleset netdev) | $NFT -f -