Adding new elements result in a confusing "Success" error message.
# nft add element x y { 0-3 }
[...]
Error: Could not process rule: Success
add element x y { 0-3 }
^^^^^^^^^^^^^^^^^^^^^^^^
after this patch, this reports:
Error: Could not process rule: File exists
add element x y { 0-3 }
^^^^^^^^^^^^^^^^^^^^^^^^
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
return 0;
err:
+ errno = EEXIST;
return expr_binary_error(msgs, lei->expr, new->expr,
"conflicting intervals specified");
}
expr_error(msgs, new_intervals[i]->expr,
"interval overlaps with an existing one");
+ errno = EEXIST;
ret = -1;
goto out;
}