]> err.no Git - linux-2.6/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)
commitb7047a1c886386b10a103b4fea26678db8b57832
tree7bc7d14b5a71470f774f190d7809cca45e8bef8f
parent019f692ea719a2da17606511d2648b8cc1762268
[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