mirror of
https://github.com/torvalds/linux.git
synced 2026-02-04 15:28:49 +08:00
[NETFILTER]: ip{6}_queue: prevent unregistration race with nfnetlink_queue
Since nfnetlink_queue can override ip{6}_queue as queue handlers, we
can no longer blindly unregister whoever is registered for PF_INET[6],
but only unregister ourselves.
Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f682faefb8
commit
210a9ebef2
@@ -692,7 +692,7 @@ init_or_cleanup(int init)
|
||||
return status;
|
||||
|
||||
cleanup:
|
||||
nf_unregister_queue_handler(PF_INET);
|
||||
nf_unregister_queue_handlers(&ipq_enqueue_packet);
|
||||
synchronize_net();
|
||||
ipq_flush(NF_DROP);
|
||||
|
||||
|
||||
@@ -687,7 +687,7 @@ init_or_cleanup(int init)
|
||||
return status;
|
||||
|
||||
cleanup:
|
||||
nf_unregister_queue_handler(PF_INET6);
|
||||
nf_unregister_queue_handlers(&ipq_enqueue_packet);
|
||||
synchronize_net();
|
||||
ipq_flush(NF_DROP);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user