1 /* This file contains all the functions required for the standalone
4 These are not required by the compatibility layer.
7 /* (C) 1999-2001 Paul `Rusty' Russell
8 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * 16 Dec 2003: Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
15 * - generalize L3 protocol dependent part.
17 * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c
20 #include <linux/types.h>
21 #include <linux/netfilter.h>
22 #include <linux/module.h>
23 #include <linux/skbuff.h>
24 #include <linux/proc_fs.h>
25 #include <linux/seq_file.h>
26 #include <linux/percpu.h>
27 #include <linux/netdevice.h>
29 #include <linux/sysctl.h>
32 #define ASSERT_READ_LOCK(x)
33 #define ASSERT_WRITE_LOCK(x)
35 #include <net/netfilter/nf_conntrack.h>
36 #include <net/netfilter/nf_conntrack_core.h>
37 #include <net/netfilter/nf_conntrack_l3proto.h>
38 #include <net/netfilter/nf_conntrack_protocol.h>
39 #include <net/netfilter/nf_conntrack_expect.h>
40 #include <net/netfilter/nf_conntrack_helper.h>
45 #define DEBUGP(format, args...)
48 MODULE_LICENSE("GPL");
50 extern atomic_t nf_conntrack_count;
51 DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat);
53 static int kill_l3proto(struct nf_conn *i, void *data)
55 return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num ==
56 ((struct nf_conntrack_l3proto *)data)->l3proto);
59 static int kill_proto(struct nf_conn *i, void *data)
61 struct nf_conntrack_protocol *proto;
62 proto = (struct nf_conntrack_protocol *)data;
63 return (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum ==
65 (i->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num ==
71 print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
72 struct nf_conntrack_l3proto *l3proto,
73 struct nf_conntrack_protocol *proto)
75 return l3proto->print_tuple(s, tuple) || proto->print_tuple(s, tuple);
78 #ifdef CONFIG_NF_CT_ACCT
80 seq_print_counters(struct seq_file *s,
81 const struct ip_conntrack_counter *counter)
83 return seq_printf(s, "packets=%llu bytes=%llu ",
84 (unsigned long long)counter->packets,
85 (unsigned long long)counter->bytes);
88 #define seq_print_counters(x, y) 0
91 struct ct_iter_state {
95 static struct list_head *ct_get_first(struct seq_file *seq)
97 struct ct_iter_state *st = seq->private;
100 st->bucket < nf_conntrack_htable_size;
102 if (!list_empty(&nf_conntrack_hash[st->bucket]))
103 return nf_conntrack_hash[st->bucket].next;
108 static struct list_head *ct_get_next(struct seq_file *seq, struct list_head *head)
110 struct ct_iter_state *st = seq->private;
113 while (head == &nf_conntrack_hash[st->bucket]) {
114 if (++st->bucket >= nf_conntrack_htable_size)
116 head = nf_conntrack_hash[st->bucket].next;
121 static struct list_head *ct_get_idx(struct seq_file *seq, loff_t pos)
123 struct list_head *head = ct_get_first(seq);
126 while (pos && (head = ct_get_next(seq, head)))
128 return pos ? NULL : head;
131 static void *ct_seq_start(struct seq_file *seq, loff_t *pos)
133 read_lock_bh(&nf_conntrack_lock);
134 return ct_get_idx(seq, *pos);
137 static void *ct_seq_next(struct seq_file *s, void *v, loff_t *pos)
140 return ct_get_next(s, v);
143 static void ct_seq_stop(struct seq_file *s, void *v)
145 read_unlock_bh(&nf_conntrack_lock);
148 /* return 0 on success, 1 in case of error */
149 static int ct_seq_show(struct seq_file *s, void *v)
151 const struct nf_conntrack_tuple_hash *hash = v;
152 const struct nf_conn *conntrack = nf_ct_tuplehash_to_ctrack(hash);
153 struct nf_conntrack_l3proto *l3proto;
154 struct nf_conntrack_protocol *proto;
156 ASSERT_READ_LOCK(&nf_conntrack_lock);
157 NF_CT_ASSERT(conntrack);
159 /* we only want to print DIR_ORIGINAL */
160 if (NF_CT_DIRECTION(hash))
163 l3proto = __nf_ct_l3proto_find(conntrack->tuplehash[IP_CT_DIR_ORIGINAL]
166 NF_CT_ASSERT(l3proto);
167 proto = __nf_ct_proto_find(conntrack->tuplehash[IP_CT_DIR_ORIGINAL]
169 conntrack->tuplehash[IP_CT_DIR_ORIGINAL]
170 .tuple.dst.protonum);
173 if (seq_printf(s, "%-8s %u %-8s %u %ld ",
175 conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.l3num,
177 conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum,
178 timer_pending(&conntrack->timeout)
179 ? (long)(conntrack->timeout.expires - jiffies)/HZ : 0) != 0)
182 if (l3proto->print_conntrack(s, conntrack))
185 if (proto->print_conntrack(s, conntrack))
188 if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
192 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_ORIGINAL]))
195 if (!(test_bit(IPS_SEEN_REPLY_BIT, &conntrack->status)))
196 if (seq_printf(s, "[UNREPLIED] "))
199 if (print_tuple(s, &conntrack->tuplehash[IP_CT_DIR_REPLY].tuple,
203 if (seq_print_counters(s, &conntrack->counters[IP_CT_DIR_REPLY]))
206 if (test_bit(IPS_ASSURED_BIT, &conntrack->status))
207 if (seq_printf(s, "[ASSURED] "))
210 #if defined(CONFIG_NF_CONNTRACK_MARK)
211 if (seq_printf(s, "mark=%u ", conntrack->mark))
215 #ifdef CONFIG_NF_CONNTRACK_SECMARK
216 if (seq_printf(s, "secmark=%u ", conntrack->secmark))
220 if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use)))
226 static struct seq_operations ct_seq_ops = {
227 .start = ct_seq_start,
233 static int ct_open(struct inode *inode, struct file *file)
235 struct seq_file *seq;
236 struct ct_iter_state *st;
239 st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
242 ret = seq_open(file, &ct_seq_ops);
245 seq = file->private_data;
247 memset(st, 0, sizeof(struct ct_iter_state));
254 static struct file_operations ct_file_ops = {
255 .owner = THIS_MODULE,
259 .release = seq_release_private,
262 static void *ct_cpu_seq_start(struct seq_file *seq, loff_t *pos)
267 return SEQ_START_TOKEN;
269 for (cpu = *pos-1; cpu < NR_CPUS; ++cpu) {
270 if (!cpu_possible(cpu))
273 return &per_cpu(nf_conntrack_stat, cpu);
279 static void *ct_cpu_seq_next(struct seq_file *seq, void *v, loff_t *pos)
283 for (cpu = *pos; cpu < NR_CPUS; ++cpu) {
284 if (!cpu_possible(cpu))
287 return &per_cpu(nf_conntrack_stat, cpu);
293 static void ct_cpu_seq_stop(struct seq_file *seq, void *v)
297 static int ct_cpu_seq_show(struct seq_file *seq, void *v)
299 unsigned int nr_conntracks = atomic_read(&nf_conntrack_count);
300 struct ip_conntrack_stat *st = v;
302 if (v == SEQ_START_TOKEN) {
303 seq_printf(seq, "entries searched found new invalid ignore delete delete_list insert insert_failed drop early_drop icmp_error expect_new expect_create expect_delete\n");
307 seq_printf(seq, "%08x %08x %08x %08x %08x %08x %08x %08x "
308 "%08x %08x %08x %08x %08x %08x %08x %08x \n",
330 static struct seq_operations ct_cpu_seq_ops = {
331 .start = ct_cpu_seq_start,
332 .next = ct_cpu_seq_next,
333 .stop = ct_cpu_seq_stop,
334 .show = ct_cpu_seq_show,
337 static int ct_cpu_seq_open(struct inode *inode, struct file *file)
339 return seq_open(file, &ct_cpu_seq_ops);
342 static struct file_operations ct_cpu_seq_fops = {
343 .owner = THIS_MODULE,
344 .open = ct_cpu_seq_open,
347 .release = seq_release_private,
349 #endif /* CONFIG_PROC_FS */
353 int nf_conntrack_checksum __read_mostly = 1;
357 /* From nf_conntrack_core.c */
358 extern int nf_conntrack_max;
359 extern unsigned int nf_conntrack_htable_size;
361 /* From nf_conntrack_proto_tcp.c */
362 extern unsigned int nf_ct_tcp_timeout_syn_sent;
363 extern unsigned int nf_ct_tcp_timeout_syn_recv;
364 extern unsigned int nf_ct_tcp_timeout_established;
365 extern unsigned int nf_ct_tcp_timeout_fin_wait;
366 extern unsigned int nf_ct_tcp_timeout_close_wait;
367 extern unsigned int nf_ct_tcp_timeout_last_ack;
368 extern unsigned int nf_ct_tcp_timeout_time_wait;
369 extern unsigned int nf_ct_tcp_timeout_close;
370 extern unsigned int nf_ct_tcp_timeout_max_retrans;
371 extern int nf_ct_tcp_loose;
372 extern int nf_ct_tcp_be_liberal;
373 extern int nf_ct_tcp_max_retrans;
375 /* From nf_conntrack_proto_udp.c */
376 extern unsigned int nf_ct_udp_timeout;
377 extern unsigned int nf_ct_udp_timeout_stream;
379 /* From nf_conntrack_proto_generic.c */
380 extern unsigned int nf_ct_generic_timeout;
382 /* Log invalid packets of a given protocol */
383 static int log_invalid_proto_min = 0;
384 static int log_invalid_proto_max = 255;
386 static struct ctl_table_header *nf_ct_sysctl_header;
388 static ctl_table nf_ct_sysctl_table[] = {
390 .ctl_name = NET_NF_CONNTRACK_MAX,
391 .procname = "nf_conntrack_max",
392 .data = &nf_conntrack_max,
393 .maxlen = sizeof(int),
395 .proc_handler = &proc_dointvec,
398 .ctl_name = NET_NF_CONNTRACK_COUNT,
399 .procname = "nf_conntrack_count",
400 .data = &nf_conntrack_count,
401 .maxlen = sizeof(int),
403 .proc_handler = &proc_dointvec,
406 .ctl_name = NET_NF_CONNTRACK_BUCKETS,
407 .procname = "nf_conntrack_buckets",
408 .data = &nf_conntrack_htable_size,
409 .maxlen = sizeof(unsigned int),
411 .proc_handler = &proc_dointvec,
414 .ctl_name = NET_NF_CONNTRACK_CHECKSUM,
415 .procname = "nf_conntrack_checksum",
416 .data = &nf_conntrack_checksum,
417 .maxlen = sizeof(unsigned int),
419 .proc_handler = &proc_dointvec,
422 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT,
423 .procname = "nf_conntrack_tcp_timeout_syn_sent",
424 .data = &nf_ct_tcp_timeout_syn_sent,
425 .maxlen = sizeof(unsigned int),
427 .proc_handler = &proc_dointvec_jiffies,
430 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV,
431 .procname = "nf_conntrack_tcp_timeout_syn_recv",
432 .data = &nf_ct_tcp_timeout_syn_recv,
433 .maxlen = sizeof(unsigned int),
435 .proc_handler = &proc_dointvec_jiffies,
438 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED,
439 .procname = "nf_conntrack_tcp_timeout_established",
440 .data = &nf_ct_tcp_timeout_established,
441 .maxlen = sizeof(unsigned int),
443 .proc_handler = &proc_dointvec_jiffies,
446 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT,
447 .procname = "nf_conntrack_tcp_timeout_fin_wait",
448 .data = &nf_ct_tcp_timeout_fin_wait,
449 .maxlen = sizeof(unsigned int),
451 .proc_handler = &proc_dointvec_jiffies,
454 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT,
455 .procname = "nf_conntrack_tcp_timeout_close_wait",
456 .data = &nf_ct_tcp_timeout_close_wait,
457 .maxlen = sizeof(unsigned int),
459 .proc_handler = &proc_dointvec_jiffies,
462 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK,
463 .procname = "nf_conntrack_tcp_timeout_last_ack",
464 .data = &nf_ct_tcp_timeout_last_ack,
465 .maxlen = sizeof(unsigned int),
467 .proc_handler = &proc_dointvec_jiffies,
470 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT,
471 .procname = "nf_conntrack_tcp_timeout_time_wait",
472 .data = &nf_ct_tcp_timeout_time_wait,
473 .maxlen = sizeof(unsigned int),
475 .proc_handler = &proc_dointvec_jiffies,
478 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE,
479 .procname = "nf_conntrack_tcp_timeout_close",
480 .data = &nf_ct_tcp_timeout_close,
481 .maxlen = sizeof(unsigned int),
483 .proc_handler = &proc_dointvec_jiffies,
486 .ctl_name = NET_NF_CONNTRACK_UDP_TIMEOUT,
487 .procname = "nf_conntrack_udp_timeout",
488 .data = &nf_ct_udp_timeout,
489 .maxlen = sizeof(unsigned int),
491 .proc_handler = &proc_dointvec_jiffies,
494 .ctl_name = NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM,
495 .procname = "nf_conntrack_udp_timeout_stream",
496 .data = &nf_ct_udp_timeout_stream,
497 .maxlen = sizeof(unsigned int),
499 .proc_handler = &proc_dointvec_jiffies,
502 .ctl_name = NET_NF_CONNTRACK_GENERIC_TIMEOUT,
503 .procname = "nf_conntrack_generic_timeout",
504 .data = &nf_ct_generic_timeout,
505 .maxlen = sizeof(unsigned int),
507 .proc_handler = &proc_dointvec_jiffies,
510 .ctl_name = NET_NF_CONNTRACK_LOG_INVALID,
511 .procname = "nf_conntrack_log_invalid",
512 .data = &nf_ct_log_invalid,
513 .maxlen = sizeof(unsigned int),
515 .proc_handler = &proc_dointvec_minmax,
516 .strategy = &sysctl_intvec,
517 .extra1 = &log_invalid_proto_min,
518 .extra2 = &log_invalid_proto_max,
521 .ctl_name = NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS,
522 .procname = "nf_conntrack_tcp_timeout_max_retrans",
523 .data = &nf_ct_tcp_timeout_max_retrans,
524 .maxlen = sizeof(unsigned int),
526 .proc_handler = &proc_dointvec_jiffies,
529 .ctl_name = NET_NF_CONNTRACK_TCP_LOOSE,
530 .procname = "nf_conntrack_tcp_loose",
531 .data = &nf_ct_tcp_loose,
532 .maxlen = sizeof(unsigned int),
534 .proc_handler = &proc_dointvec,
537 .ctl_name = NET_NF_CONNTRACK_TCP_BE_LIBERAL,
538 .procname = "nf_conntrack_tcp_be_liberal",
539 .data = &nf_ct_tcp_be_liberal,
540 .maxlen = sizeof(unsigned int),
542 .proc_handler = &proc_dointvec,
545 .ctl_name = NET_NF_CONNTRACK_TCP_MAX_RETRANS,
546 .procname = "nf_conntrack_tcp_max_retrans",
547 .data = &nf_ct_tcp_max_retrans,
548 .maxlen = sizeof(unsigned int),
550 .proc_handler = &proc_dointvec,
556 #define NET_NF_CONNTRACK_MAX 2089
558 static ctl_table nf_ct_netfilter_table[] = {
560 .ctl_name = NET_NETFILTER,
561 .procname = "netfilter",
563 .child = nf_ct_sysctl_table,
566 .ctl_name = NET_NF_CONNTRACK_MAX,
567 .procname = "nf_conntrack_max",
568 .data = &nf_conntrack_max,
569 .maxlen = sizeof(int),
571 .proc_handler = &proc_dointvec,
576 static ctl_table nf_ct_net_table[] = {
581 .child = nf_ct_netfilter_table,
585 EXPORT_SYMBOL(nf_ct_log_invalid);
586 #endif /* CONFIG_SYSCTL */
588 int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto)
592 write_lock_bh(&nf_conntrack_lock);
593 if (nf_ct_l3protos[proto->l3proto] != &nf_conntrack_generic_l3proto) {
597 nf_ct_l3protos[proto->l3proto] = proto;
599 write_unlock_bh(&nf_conntrack_lock);
604 void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto)
606 write_lock_bh(&nf_conntrack_lock);
607 nf_ct_l3protos[proto->l3proto] = &nf_conntrack_generic_l3proto;
608 write_unlock_bh(&nf_conntrack_lock);
610 /* Somebody could be still looking at the proto in bh. */
613 /* Remove all contrack entries for this protocol */
614 nf_ct_iterate_cleanup(kill_l3proto, proto);
617 /* FIXME: Allow NULL functions and sub in pointers to generic for
619 int nf_conntrack_protocol_register(struct nf_conntrack_protocol *proto)
624 write_lock_bh(&nf_conntrack_lock);
625 if (nf_ct_protos[proto->l3proto]) {
626 if (nf_ct_protos[proto->l3proto][proto->proto]
627 != &nf_conntrack_generic_protocol) {
632 /* l3proto may be loaded latter. */
633 struct nf_conntrack_protocol **proto_array;
636 write_unlock_bh(&nf_conntrack_lock);
638 proto_array = (struct nf_conntrack_protocol **)
639 kmalloc(MAX_NF_CT_PROTO *
640 sizeof(struct nf_conntrack_protocol *),
642 if (proto_array == NULL) {
646 for (i = 0; i < MAX_NF_CT_PROTO; i++)
647 proto_array[i] = &nf_conntrack_generic_protocol;
649 write_lock_bh(&nf_conntrack_lock);
650 if (nf_ct_protos[proto->l3proto]) {
651 /* bad timing, but no problem */
652 write_unlock_bh(&nf_conntrack_lock);
655 nf_ct_protos[proto->l3proto] = proto_array;
656 write_unlock_bh(&nf_conntrack_lock);
660 * Just once because array is never freed until unloading
666 nf_ct_protos[proto->l3proto][proto->proto] = proto;
669 write_unlock_bh(&nf_conntrack_lock);
674 void nf_conntrack_protocol_unregister(struct nf_conntrack_protocol *proto)
676 write_lock_bh(&nf_conntrack_lock);
677 nf_ct_protos[proto->l3proto][proto->proto]
678 = &nf_conntrack_generic_protocol;
679 write_unlock_bh(&nf_conntrack_lock);
681 /* Somebody could be still looking at the proto in bh. */
684 /* Remove all contrack entries for this protocol */
685 nf_ct_iterate_cleanup(kill_proto, proto);
688 static int __init nf_conntrack_standalone_init(void)
690 #ifdef CONFIG_PROC_FS
691 struct proc_dir_entry *proc, *proc_exp, *proc_stat;
695 ret = nf_conntrack_init();
699 #ifdef CONFIG_PROC_FS
700 proc = proc_net_fops_create("nf_conntrack", 0440, &ct_file_ops);
701 if (!proc) goto cleanup_init;
703 proc_exp = proc_net_fops_create("nf_conntrack_expect", 0440,
705 if (!proc_exp) goto cleanup_proc;
707 proc_stat = create_proc_entry("nf_conntrack", S_IRUGO, proc_net_stat);
709 goto cleanup_proc_exp;
711 proc_stat->proc_fops = &ct_cpu_seq_fops;
712 proc_stat->owner = THIS_MODULE;
715 nf_ct_sysctl_header = register_sysctl_table(nf_ct_net_table, 0);
716 if (nf_ct_sysctl_header == NULL) {
717 printk("nf_conntrack: can't register to sysctl.\n");
719 goto cleanup_proc_stat;
727 #ifdef CONFIG_PROC_FS
728 remove_proc_entry("nf_conntrack", proc_net_stat);
730 proc_net_remove("nf_conntrack_expect");
732 proc_net_remove("nf_conntrack");
734 #endif /* CNFIG_PROC_FS */
735 nf_conntrack_cleanup();
739 static void __exit nf_conntrack_standalone_fini(void)
742 unregister_sysctl_table(nf_ct_sysctl_header);
744 #ifdef CONFIG_PROC_FS
745 remove_proc_entry("nf_conntrack", proc_net_stat);
746 proc_net_remove("nf_conntrack_expect");
747 proc_net_remove("nf_conntrack");
748 #endif /* CNFIG_PROC_FS */
749 nf_conntrack_cleanup();
752 module_init(nf_conntrack_standalone_init);
753 module_exit(nf_conntrack_standalone_fini);
755 /* Some modules need us, but don't depend directly on any symbol.
756 They should call this. */
757 void need_conntrack(void)
761 #ifdef CONFIG_NF_CONNTRACK_EVENTS
762 EXPORT_SYMBOL_GPL(nf_conntrack_chain);
763 EXPORT_SYMBOL_GPL(nf_conntrack_expect_chain);
764 EXPORT_SYMBOL_GPL(nf_conntrack_register_notifier);
765 EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier);
766 EXPORT_SYMBOL_GPL(__nf_ct_event_cache_init);
767 EXPORT_PER_CPU_SYMBOL_GPL(nf_conntrack_ecache);
768 EXPORT_SYMBOL_GPL(nf_ct_deliver_cached_events);
770 EXPORT_SYMBOL(nf_ct_l3proto_try_module_get);
771 EXPORT_SYMBOL(nf_ct_l3proto_module_put);
772 EXPORT_SYMBOL(nf_conntrack_l3proto_register);
773 EXPORT_SYMBOL(nf_conntrack_l3proto_unregister);
774 EXPORT_SYMBOL(nf_conntrack_protocol_register);
775 EXPORT_SYMBOL(nf_conntrack_protocol_unregister);
776 EXPORT_SYMBOL(nf_ct_invert_tuplepr);
777 EXPORT_SYMBOL(nf_conntrack_destroyed);
778 EXPORT_SYMBOL(need_conntrack);
779 EXPORT_SYMBOL(nf_conntrack_helper_register);
780 EXPORT_SYMBOL(nf_conntrack_helper_unregister);
781 EXPORT_SYMBOL(nf_ct_iterate_cleanup);
782 EXPORT_SYMBOL(__nf_ct_refresh_acct);
783 EXPORT_SYMBOL(nf_ct_protos);
784 EXPORT_SYMBOL(__nf_ct_proto_find);
785 EXPORT_SYMBOL(nf_ct_proto_find_get);
786 EXPORT_SYMBOL(nf_ct_proto_put);
787 EXPORT_SYMBOL(nf_ct_l3proto_find_get);
788 EXPORT_SYMBOL(nf_ct_l3proto_put);
789 EXPORT_SYMBOL(nf_ct_l3protos);
790 EXPORT_SYMBOL_GPL(nf_conntrack_checksum);
791 EXPORT_SYMBOL(nf_conntrack_expect_alloc);
792 EXPORT_SYMBOL(nf_conntrack_expect_put);
793 EXPORT_SYMBOL(nf_conntrack_expect_related);
794 EXPORT_SYMBOL(nf_conntrack_unexpect_related);
795 EXPORT_SYMBOL(nf_conntrack_tuple_taken);
796 EXPORT_SYMBOL(nf_conntrack_htable_size);
797 EXPORT_SYMBOL(nf_conntrack_lock);
798 EXPORT_SYMBOL(nf_conntrack_hash);
799 EXPORT_SYMBOL(nf_conntrack_untracked);
800 EXPORT_SYMBOL_GPL(nf_conntrack_find_get);
801 #ifdef CONFIG_IP_NF_NAT_NEEDED
802 EXPORT_SYMBOL(nf_conntrack_tcp_update);
804 EXPORT_SYMBOL(__nf_conntrack_confirm);
805 EXPORT_SYMBOL(nf_ct_get_tuple);
806 EXPORT_SYMBOL(nf_ct_invert_tuple);
807 EXPORT_SYMBOL(nf_conntrack_in);
808 EXPORT_SYMBOL(__nf_conntrack_attach);
809 EXPORT_SYMBOL(nf_conntrack_alloc);
810 EXPORT_SYMBOL(nf_conntrack_free);
811 EXPORT_SYMBOL(nf_conntrack_flush);
812 EXPORT_SYMBOL(nf_ct_remove_expectations);
813 EXPORT_SYMBOL(nf_ct_helper_find_get);
814 EXPORT_SYMBOL(nf_ct_helper_put);
815 EXPORT_SYMBOL(__nf_conntrack_helper_find_byname);
816 EXPORT_SYMBOL(__nf_conntrack_find);
817 EXPORT_SYMBOL(nf_ct_unlink_expect);
818 EXPORT_SYMBOL(nf_conntrack_hash_insert);
819 EXPORT_SYMBOL(__nf_conntrack_expect_find);
820 EXPORT_SYMBOL(nf_conntrack_expect_find);
821 EXPORT_SYMBOL(nf_conntrack_expect_list);
822 #if defined(CONFIG_NF_CT_NETLINK) || \
823 defined(CONFIG_NF_CT_NETLINK_MODULE)
824 EXPORT_SYMBOL(nf_ct_port_tuple_to_nfattr);
825 EXPORT_SYMBOL(nf_ct_port_nfattr_to_tuple);