]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: nfnetlink_log: fix EPERM when binding/unbinding and instance 0 exists
authorPatrick McHardy <kaber@trash.net>
Mon, 10 Mar 2008 23:44:13 +0000 (16:44 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Mar 2008 23:44:13 +0000 (16:44 -0700)
commitc0b8ab90f675397193e84135d13ce8dbfd1bf00d
tree7bc7d14b5a71470f774f190d7809cca45e8bef8f
parent936ea3a1d8eea52aa2dcc60ce0541e688ed4bef6
[NETFILTER]: nfnetlink_log: fix EPERM when binding/unbinding and instance 0 exists

When binding or unbinding to an address family, the res_id is usually set
to zero. When logging instance 0 already exists and is owned by a different
process, this makes nfunl_recv_config return -EPERM without performing
the bind operation.

Since no operation on the foreign logging instance itself was requested,
this is incorrect. Move bind/unbind commands before the queue instance
permissions checks.

Also remove an incorrect comment.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nfnetlink_log.c