summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2005-08-09 20:20:54 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:51:08 -0700
commit210a9ebef2d1bd32d9e9d81c84d538e237769cdb (patch)
treeb4ad1d992f137020333090c0fae6c898ee77fe5b /net
parentf682faefb8c6045468c4cf0fe435128352683c22 (diff)
downloadlinux-210a9ebef2d1bd32d9e9d81c84d538e237769cdb.tar.gz
linux-210a9ebef2d1bd32d9e9d81c84d538e237769cdb.tar.bz2
linux-210a9ebef2d1bd32d9e9d81c84d538e237769cdb.zip
[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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/ip_queue.c2
-rw-r--r--net/ipv6/netfilter/ip6_queue.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index cfc886f382ac..629de649f130 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -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);
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 5af4cee93d9b..56ffec3568fa 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -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);