diff options
author | Harald Welte <laforge@netfilter.org> | 2005-08-09 23:23:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:51:18 -0400 |
commit | bbd86b9fc469b7e91dc7444e6abb8930811d79cb (patch) | |
tree | 0d1133f5f499cab639784407f53938ba5060807f /net/ipv4 | |
parent | fbcd923c3e0c8ec9e4ed64f5a4e5766807b32729 (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/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ip_queue.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c index 629de649f130..1c49833e00a9 100644 --- a/net/ipv4/netfilter/ip_queue.c +++ b/net/ipv4/netfilter/ip_queue.c | |||
@@ -656,6 +656,11 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length) | |||
656 | } | 656 | } |
657 | #endif /* CONFIG_PROC_FS */ | 657 | #endif /* CONFIG_PROC_FS */ |
658 | 658 | ||
659 | static struct nf_queue_handler nfqh = { | ||
660 | .name = "ip_queue", | ||
661 | .outfn = &ipq_enqueue_packet, | ||
662 | }; | ||
663 | |||
659 | static int | 664 | static int |
660 | init_or_cleanup(int init) | 665 | init_or_cleanup(int init) |
661 | { | 666 | { |
@@ -684,7 +689,7 @@ init_or_cleanup(int init) | |||
684 | register_netdevice_notifier(&ipq_dev_notifier); | 689 | register_netdevice_notifier(&ipq_dev_notifier); |
685 | ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0); | 690 | ipq_sysctl_header = register_sysctl_table(ipq_root_table, 0); |
686 | 691 | ||
687 | status = nf_register_queue_handler(PF_INET, ipq_enqueue_packet, NULL); | 692 | status = nf_register_queue_handler(PF_INET, &nfqh); |
688 | if (status < 0) { | 693 | if (status < 0) { |
689 | printk(KERN_ERR "ip_queue: failed to register queue handler\n"); | 694 | printk(KERN_ERR "ip_queue: failed to register queue handler\n"); |
690 | goto cleanup_sysctl; | 695 | goto cleanup_sysctl; |
@@ -692,7 +697,7 @@ init_or_cleanup(int init) | |||
692 | return status; | 697 | return status; |
693 | 698 | ||
694 | cleanup: | 699 | cleanup: |
695 | nf_unregister_queue_handlers(&ipq_enqueue_packet); | 700 | nf_unregister_queue_handlers(&nfqh); |
696 | synchronize_net(); | 701 | synchronize_net(); |
697 | ipq_flush(NF_DROP); | 702 | ipq_flush(NF_DROP); |
698 | 703 | ||