summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-03-10 16:45:05 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-10 16:45:05 -0700
commit94be1a3f365e2b9f2615575d7fef16a0bad106a3 (patch)
tree95f51edc80b3ce55f3a9fd882f56b8a4b45e0e31 /net
parent914afea84e3e20cdbcd040f8387a0e6ef20ffc97 (diff)
downloadop-kernel-dev-94be1a3f365e2b9f2615575d7fef16a0bad106a3.zip
op-kernel-dev-94be1a3f365e2b9f2615575d7fef16a0bad106a3.tar.gz
[NETFILTER]: nf_queue: don't return error when unregistering a non-existant handler
Commit ce7663d84: [NETFILTER]: nfnetlink_queue: don't unregister handler of other subsystem changed nf_unregister_queue_handler to return an error when attempting to unregister a queue handler that is not identical to the one passed in. This is correct in case we really do have a different queue handler already registered, but some existing userspace code always does an unbind before bind and aborts if that fails, so try to be nice and return success in that case. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index bfc2928..ddc80ea 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -51,7 +51,7 @@ int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh)
return -EINVAL;
mutex_lock(&queue_handler_mutex);
- if (queue_handler[pf] != qh) {
+ if (queue_handler[pf] && queue_handler[pf] != qh) {
mutex_unlock(&queue_handler_mutex);
return -EINVAL;
}
OpenPOWER on IntegriCloud