]> git.ipfire.org Git - thirdparty/nftables.git/commit
nftables: fix supression of "permission denied" errors
authorPatrick McHardy <kaber@trash.net>
Thu, 9 Jan 2014 18:54:02 +0000 (18:54 +0000)
committerPatrick McHardy <kaber@trash.net>
Thu, 9 Jan 2014 18:54:02 +0000 (18:54 +0000)
commitf930cc50031851c6975058e33408214ad0c240b6
treefb9cb26875448789bf602aeec1886c0c7493edf1
parenta54d7b05fb241dae62039d2c200e9a18941cf250
nftables: fix supression of "permission denied" errors

Introduction of batch support broke displaying of EPERM since those are
generated by the kernel before batch processing starts and thus have the
sequence number of the NFNL_MSG_BATCH_BEGIN message instead of the
command messages. Also only a single error message is generated for the
entire batch.

This patch fixes this by noting the batch sequence number and displaying
the error for all commands since this is what would happen if the
permission check was inside batch processing as every other check.

Signed-off-by: Patrick McHardy <kaber@trash.net>
include/mnl.h
src/main.c
src/mnl.c