Skip to content

Commit

Permalink
[NETFILTER]: ip{6}_queue: prevent unregistration race with nfnetlink_…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Harald Welte authored and David S. Miller committed Aug 29, 2005
1 parent f682fae commit 210a9eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ip_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion net/ipv6/netfilter/ip6_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 210a9eb

Please sign in to comment.