[NETFILTER]: ip{6}_queue: prevent unregistration race with nfnetlink_queue
authorHarald Welte <laforge@netfilter.org>
Wed, 10 Aug 2005 03:20:54 +0000 (20:20 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 29 Aug 2005 22:51:08 +0000 (15:51 -0700)
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>
net/ipv4/netfilter/ip_queue.c
net/ipv6/netfilter/ip6_queue.c

index cfc886f382ac819490e355884d85688b94a24923..629de649f13019808c5150c64ca71b49fcc8e68b 100644 (file)
@@ -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);
        
index 5af4cee93d9bd20eeb07a5cadca30233eaf3829a..56ffec3568fa907392126e5ad0de4eaea5dd7a08 100644 (file)
@@ -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);