aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2005-08-09 23:23:11 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:51:18 -0400
commitbbd86b9fc469b7e91dc7444e6abb8930811d79cb (patch)
tree0d1133f5f499cab639784407f53938ba5060807f /net/ipv6
parentfbcd923c3e0c8ec9e4ed64f5a4e5766807b32729 (diff)
[NETFILTER]: add /proc/net/netfilter interface to nf_queue
This patch adds a /proc/net/netfilter/nf_queue file, similar to the recently-added /proc/net/netfilter/nf_log. It indicates which queue handler is registered to which protocol family. This is useful since there are now multiple queue handlers in the treee (ip[6]_queue, nfnetlink_queue). Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_queue.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 56ffec3568fa..7ecb91e24a34 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -652,6 +652,11 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length)
652 return len; 652 return len;
653} 653}
654 654
655static struct nf_queue_handler nfqh = {
656 .name = "ip6_queue",
657 .outfn = &ipq_enqueue_packet,
658};
659
655static int 660static int
656init_or_cleanup(int init) 661init_or_cleanup(int init)
657{ 662{
@@ -679,7 +684,7 @@ init_or_cleanup(int init)
679 register_netdevice_notifier(&ipq_dev_notifier); 684 register_netdevice_notifier(&ipq_dev_notifier);
680 ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0); 685 ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0);
681 686
682 status = nf_register_queue_handler(PF_INET6, ipq_enqueue_packet, NULL); 687 status = nf_register_queue_handler(PF_INET6, &nfqh);
683 if (status < 0) { 688 if (status < 0) {
684 printk(KERN_ERR "ip6_queue: failed to register queue handler\n"); 689 printk(KERN_ERR "ip6_queue: failed to register queue handler\n");
685 goto cleanup_sysctl; 690 goto cleanup_sysctl;
@@ -687,7 +692,7 @@ init_or_cleanup(int init)
687 return status; 692 return status;
688 693
689cleanup: 694cleanup:
690 nf_unregister_queue_handlers(&ipq_enqueue_packet); 695 nf_unregister_queue_handlers(&nfqh);
691 synchronize_net(); 696 synchronize_net();
692 ipq_flush(NF_DROP); 697 ipq_flush(NF_DROP);
693 698