Its valid in case of tcp option removal:
[ {
"reset": {
"tcp option": {
"base": 123,
"len": 0,
"offset": 0
}
This makes nft-test.py -j pass again.
Fixes: e08627257ecf ("parser: reject raw payload expressions with 0 length")
Signed-off-by: Florian Westphal <fw@strlen.de>
if (kind < 0 || kind > 255)
return NULL;
- if (len <= 0 || len > (int)NFT_MAX_EXPR_LEN_BITS) {
+ if (len < 0 || len > (int)NFT_MAX_EXPR_LEN_BITS) {
json_error(ctx, "option length must be between 0 and %lu, got %d",
NFT_MAX_EXPR_LEN_BITS, len);
return NULL;