Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 1 | /* |
| 2 | * connection tracking event cache. |
| 3 | */ |
| 4 | |
| 5 | #ifndef _NF_CONNTRACK_ECACHE_H |
| 6 | #define _NF_CONNTRACK_ECACHE_H |
| 7 | #include <net/netfilter/nf_conntrack.h> |
| 8 | |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 9 | #include <net/net_namespace.h> |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 10 | #include <net/netfilter/nf_conntrack_expect.h> |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 11 | #include <linux/netfilter/nf_conntrack_common.h> |
| 12 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
| 13 | #include <net/netfilter/nf_conntrack_extend.h> |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 14 | |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 15 | struct nf_conntrack_ecache { |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 16 | unsigned long cache; /* bitops want long */ |
| 17 | unsigned long missed; /* missed events */ |
| 18 | u16 ctmask; /* bitmask of ct events to be delivered */ |
| 19 | u16 expmask; /* bitmask of expect events to be delivered */ |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 20 | u32 portid; /* netlink portid of destroyer */ |
Pablo Neira Ayuso | 5b423f6 | 2012-08-29 16:25:49 +0000 | [diff] [blame] | 21 | struct timer_list timeout; |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 22 | }; |
| 23 | |
| 24 | static inline struct nf_conntrack_ecache * |
| 25 | nf_ct_ecache_find(const struct nf_conn *ct) |
| 26 | { |
Changli Gao | e0e76c8 | 2010-11-15 12:23:24 +0100 | [diff] [blame] | 27 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 28 | return nf_ct_ext_find(ct, NF_CT_EXT_ECACHE); |
Changli Gao | e0e76c8 | 2010-11-15 12:23:24 +0100 | [diff] [blame] | 29 | #else |
| 30 | return NULL; |
| 31 | #endif |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | static inline struct nf_conntrack_ecache * |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 35 | nf_ct_ecache_ext_add(struct nf_conn *ct, u16 ctmask, u16 expmask, gfp_t gfp) |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 36 | { |
Changli Gao | e0e76c8 | 2010-11-15 12:23:24 +0100 | [diff] [blame] | 37 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 38 | struct net *net = nf_ct_net(ct); |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 39 | struct nf_conntrack_ecache *e; |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 40 | |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 41 | if (!ctmask && !expmask && net->ct.sysctl_events) { |
| 42 | ctmask = ~0; |
| 43 | expmask = ~0; |
| 44 | } |
| 45 | if (!ctmask && !expmask) |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 46 | return NULL; |
| 47 | |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 48 | e = nf_ct_ext_add(ct, NF_CT_EXT_ECACHE, gfp); |
| 49 | if (e) { |
| 50 | e->ctmask = ctmask; |
| 51 | e->expmask = expmask; |
| 52 | } |
| 53 | return e; |
Changli Gao | e0e76c8 | 2010-11-15 12:23:24 +0100 | [diff] [blame] | 54 | #else |
| 55 | return NULL; |
| 56 | #endif |
Pablo Neira Ayuso | 6bfea19 | 2009-06-02 20:08:44 +0200 | [diff] [blame] | 57 | }; |
| 58 | |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 59 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 60 | /* This structure is passed to event handler */ |
| 61 | struct nf_ct_event { |
| 62 | struct nf_conn *ct; |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 63 | u32 portid; |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 64 | int report; |
| 65 | }; |
| 66 | |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 67 | struct nf_ct_event_notifier { |
| 68 | int (*fcn)(unsigned int events, struct nf_ct_event *item); |
| 69 | }; |
| 70 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 71 | int nf_conntrack_register_notifier(struct net *net, |
| 72 | struct nf_ct_event_notifier *nb); |
| 73 | void nf_conntrack_unregister_notifier(struct net *net, |
| 74 | struct nf_ct_event_notifier *nb); |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 75 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 76 | void nf_ct_deliver_cached_events(struct nf_conn *ct); |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 77 | |
| 78 | static inline void |
Alexey Dobriyan | a71996f | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 79 | nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct) |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 80 | { |
Pablo Neira Ayuso | 70e9942 | 2011-11-22 00:16:51 +0100 | [diff] [blame] | 81 | struct net *net = nf_ct_net(ct); |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 82 | struct nf_conntrack_ecache *e; |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 83 | |
Pablo Neira Ayuso | 6bd0405 | 2012-07-05 15:42:10 +0200 | [diff] [blame] | 84 | if (!rcu_access_pointer(net->ct.nf_conntrack_event_cb)) |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 85 | return; |
| 86 | |
| 87 | e = nf_ct_ecache_find(ct); |
| 88 | if (e == NULL) |
| 89 | return; |
| 90 | |
| 91 | set_bit(event, &e->cache); |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 92 | } |
| 93 | |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 94 | static inline int |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 95 | nf_conntrack_eventmask_report(unsigned int eventmask, |
| 96 | struct nf_conn *ct, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 97 | u32 portid, |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 98 | int report) |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 99 | { |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 100 | int ret = 0; |
Pablo Neira Ayuso | 70e9942 | 2011-11-22 00:16:51 +0100 | [diff] [blame] | 101 | struct net *net = nf_ct_net(ct); |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 102 | struct nf_ct_event_notifier *notify; |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 103 | struct nf_conntrack_ecache *e; |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 104 | |
| 105 | rcu_read_lock(); |
Pablo Neira Ayuso | 70e9942 | 2011-11-22 00:16:51 +0100 | [diff] [blame] | 106 | notify = rcu_dereference(net->ct.nf_conntrack_event_cb); |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 107 | if (notify == NULL) |
| 108 | goto out_unlock; |
| 109 | |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 110 | e = nf_ct_ecache_find(ct); |
| 111 | if (e == NULL) |
| 112 | goto out_unlock; |
| 113 | |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 114 | if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) { |
| 115 | struct nf_ct_event item = { |
| 116 | .ct = ct, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 117 | .portid = e->portid ? e->portid : portid, |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 118 | .report = report |
| 119 | }; |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 120 | /* This is a resent of a destroy event? If so, skip missed */ |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 121 | unsigned long missed = e->portid ? 0 : e->missed; |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 122 | |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 123 | if (!((eventmask | missed) & e->ctmask)) |
| 124 | goto out_unlock; |
| 125 | |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 126 | ret = notify->fcn(eventmask | missed, &item); |
| 127 | if (unlikely(ret < 0 || missed)) { |
| 128 | spin_lock_bh(&ct->lock); |
| 129 | if (ret < 0) { |
| 130 | /* This is a destroy event that has been |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 131 | * triggered by a process, we store the PORTID |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 132 | * to include it in the retransmission. */ |
| 133 | if (eventmask & (1 << IPCT_DESTROY) && |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 134 | e->portid == 0 && portid != 0) |
| 135 | e->portid = portid; |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 136 | else |
| 137 | e->missed |= eventmask; |
| 138 | } else |
| 139 | e->missed &= ~missed; |
| 140 | spin_unlock_bh(&ct->lock); |
| 141 | } |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 142 | } |
| 143 | out_unlock: |
| 144 | rcu_read_unlock(); |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 145 | return ret; |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 146 | } |
| 147 | |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 148 | static inline int |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 149 | nf_conntrack_event_report(enum ip_conntrack_events event, struct nf_conn *ct, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 150 | u32 portid, int report) |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 151 | { |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 152 | return nf_conntrack_eventmask_report(1 << event, ct, portid, report); |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 153 | } |
| 154 | |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 155 | static inline int |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 156 | nf_conntrack_event(enum ip_conntrack_events event, struct nf_conn *ct) |
| 157 | { |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 158 | return nf_conntrack_eventmask_report(1 << event, ct, 0, 0); |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 159 | } |
| 160 | |
| 161 | struct nf_exp_event { |
| 162 | struct nf_conntrack_expect *exp; |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 163 | u32 portid; |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 164 | int report; |
| 165 | }; |
| 166 | |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 167 | struct nf_exp_event_notifier { |
| 168 | int (*fcn)(unsigned int events, struct nf_exp_event *item); |
| 169 | }; |
| 170 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 171 | int nf_ct_expect_register_notifier(struct net *net, |
| 172 | struct nf_exp_event_notifier *nb); |
| 173 | void nf_ct_expect_unregister_notifier(struct net *net, |
| 174 | struct nf_exp_event_notifier *nb); |
Patrick McHardy | 010c7d6 | 2007-03-14 16:40:10 -0700 | [diff] [blame] | 175 | |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 176 | static inline void |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 177 | nf_ct_expect_event_report(enum ip_conntrack_expect_events event, |
| 178 | struct nf_conntrack_expect *exp, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 179 | u32 portid, |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 180 | int report) |
| 181 | { |
Pablo Neira Ayuso | 70e9942 | 2011-11-22 00:16:51 +0100 | [diff] [blame] | 182 | struct net *net = nf_ct_exp_net(exp); |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 183 | struct nf_exp_event_notifier *notify; |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 184 | struct nf_conntrack_ecache *e; |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 185 | |
| 186 | rcu_read_lock(); |
Pablo Neira Ayuso | 70e9942 | 2011-11-22 00:16:51 +0100 | [diff] [blame] | 187 | notify = rcu_dereference(net->ct.nf_expect_event_cb); |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 188 | if (notify == NULL) |
| 189 | goto out_unlock; |
| 190 | |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 191 | e = nf_ct_ecache_find(exp->master); |
| 192 | if (e == NULL) |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 193 | goto out_unlock; |
| 194 | |
Patrick McHardy | 0cebe4b | 2010-02-03 13:51:51 +0100 | [diff] [blame] | 195 | if (e->expmask & (1 << event)) { |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 196 | struct nf_exp_event item = { |
| 197 | .exp = exp, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 198 | .portid = portid, |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 199 | .report = report |
| 200 | }; |
Pablo Neira Ayuso | a0891aa | 2009-06-13 12:26:29 +0200 | [diff] [blame] | 201 | notify->fcn(1 << event, &item); |
Pablo Neira Ayuso | e34d5c1 | 2009-06-03 10:32:06 +0200 | [diff] [blame] | 202 | } |
| 203 | out_unlock: |
| 204 | rcu_read_unlock(); |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 205 | } |
| 206 | |
| 207 | static inline void |
Patrick McHardy | 6823645 | 2007-07-07 22:30:49 -0700 | [diff] [blame] | 208 | nf_ct_expect_event(enum ip_conntrack_expect_events event, |
| 209 | struct nf_conntrack_expect *exp) |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 210 | { |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 211 | nf_ct_expect_event_report(event, exp, 0, 0); |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 212 | } |
| 213 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 214 | int nf_conntrack_ecache_pernet_init(struct net *net); |
| 215 | void nf_conntrack_ecache_pernet_fini(struct net *net); |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 216 | |
Joe Perches | 4e77be4 | 2013-09-23 11:37:48 -0700 | [diff] [blame] | 217 | int nf_conntrack_ecache_init(void); |
| 218 | void nf_conntrack_ecache_fini(void); |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 219 | #else /* CONFIG_NF_CONNTRACK_EVENTS */ |
| 220 | |
| 221 | static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, |
Linus Torvalds | 64f1b653 | 2008-10-11 09:46:24 -0700 | [diff] [blame] | 222 | struct nf_conn *ct) {} |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 223 | static inline int nf_conntrack_eventmask_report(unsigned int eventmask, |
| 224 | struct nf_conn *ct, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 225 | u32 portid, |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 226 | int report) { return 0; } |
| 227 | static inline int nf_conntrack_event(enum ip_conntrack_events event, |
| 228 | struct nf_conn *ct) { return 0; } |
| 229 | static inline int nf_conntrack_event_report(enum ip_conntrack_events event, |
| 230 | struct nf_conn *ct, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 231 | u32 portid, |
Pablo Neira Ayuso | dd7669a | 2009-06-13 12:30:52 +0200 | [diff] [blame] | 232 | int report) { return 0; } |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 233 | static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {} |
Patrick McHardy | 6823645 | 2007-07-07 22:30:49 -0700 | [diff] [blame] | 234 | static inline void nf_ct_expect_event(enum ip_conntrack_expect_events event, |
| 235 | struct nf_conntrack_expect *exp) {} |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 236 | static inline void nf_ct_expect_event_report(enum ip_conntrack_expect_events e, |
| 237 | struct nf_conntrack_expect *exp, |
Eric W. Biederman | 15e4730 | 2012-09-07 20:12:54 +0000 | [diff] [blame] | 238 | u32 portid, |
Pablo Neira Ayuso | 19abb7b | 2008-11-18 11:56:20 +0100 | [diff] [blame] | 239 | int report) {} |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 240 | |
Gao feng | 3fe0f94 | 2013-01-21 22:10:28 +0000 | [diff] [blame] | 241 | static inline int nf_conntrack_ecache_pernet_init(struct net *net) |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 242 | { |
| 243 | return 0; |
Guo-Fu Tseng | bb21c95 | 2008-10-09 21:10:36 -0700 | [diff] [blame] | 244 | } |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 245 | |
Gao feng | 3fe0f94 | 2013-01-21 22:10:28 +0000 | [diff] [blame] | 246 | static inline void nf_conntrack_ecache_pernet_fini(struct net *net) |
| 247 | { |
| 248 | } |
| 249 | |
| 250 | static inline int nf_conntrack_ecache_init(void) |
| 251 | { |
| 252 | return 0; |
| 253 | } |
| 254 | |
| 255 | static inline void nf_conntrack_ecache_fini(void) |
Alexey Dobriyan | 6058fa6 | 2008-10-08 11:35:07 +0200 | [diff] [blame] | 256 | { |
| 257 | } |
Martin Josefsson | f618012 | 2006-11-29 02:35:01 +0100 | [diff] [blame] | 258 | #endif /* CONFIG_NF_CONNTRACK_EVENTS */ |
| 259 | |
| 260 | #endif /*_NF_CONNTRACK_ECACHE_H*/ |
| 261 | |