diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-03 17:06:21 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-12-03 17:09:28 +0100 |
commit | 1018eae77176cffd39bad0e499010923642c2cba (patch) | |
tree | 72e181533c2607a896c7ed92c038797539637737 /tests/py | |
parent | fe573574fcb2605bc9011c621f44654707180765 (diff) |
parser: bail out on incorrect burst unit
Burst can be either bytes or packets, depending on the rate limit unit.
# nft add rule x y iif eth0 limit rate 512 kbytes/second burst 5 packets
Error: syntax error, unexpected packets, expecting string or bytes
add rule x y iif eth0 limit rate 512 kbytes/second burst 5 packets
^^^^^^^
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1306
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py')
-rw-r--r-- | tests/py/any/limit.t | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/py/any/limit.t b/tests/py/any/limit.t index 8180bea3..ef7f9313 100644 --- a/tests/py/any/limit.t +++ b/tests/py/any/limit.t @@ -14,6 +14,7 @@ limit rate 400/hour;ok limit rate 40/day;ok limit rate 400/week;ok limit rate 1023/second burst 10 packets;ok +limit rate 1023/second burst 10 bytes;fail limit rate 1 kbytes/second;ok limit rate 2 kbytes/second;ok @@ -21,6 +22,7 @@ limit rate 1025 kbytes/second;ok limit rate 1023 mbytes/second;ok limit rate 10230 mbytes/second;ok limit rate 1023000 mbytes/second;ok +limit rate 512 kbytes/second burst 5 packets;fail limit rate 1025 bytes/second burst 512 bytes;ok limit rate 1025 kbytes/second burst 1023 kbytes;ok |