Commit 6823645d authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: nf_conntrack_expect: function naming unification



Currently there is a wild mix of nf_conntrack_expect_, nf_ct_exp_,
expect_, exp_, ...

Consistently use nf_ct_ as prefix for exported functions.
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 53aba597
......@@ -84,7 +84,7 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
struct nf_conntrack_l4proto *proto);
extern struct hlist_head *nf_conntrack_hash;
extern struct list_head nf_conntrack_expect_list;
extern struct list_head nf_ct_expect_list;
extern rwlock_t nf_conntrack_lock ;
extern struct hlist_head unconfirmed;
......
......@@ -49,15 +49,15 @@ static inline void nf_conntrack_event(enum ip_conntrack_events event,
atomic_notifier_call_chain(&nf_conntrack_chain, event, ct);
}
extern struct atomic_notifier_head nf_conntrack_expect_chain;
extern int nf_conntrack_expect_register_notifier(struct notifier_block *nb);
extern int nf_conntrack_expect_unregister_notifier(struct notifier_block *nb);
extern struct atomic_notifier_head nf_ct_expect_chain;
extern int nf_ct_expect_register_notifier(struct notifier_block *nb);
extern int nf_ct_expect_unregister_notifier(struct notifier_block *nb);
static inline void
nf_conntrack_expect_event(enum ip_conntrack_expect_events event,
struct nf_conntrack_expect *exp)
nf_ct_expect_event(enum ip_conntrack_expect_events event,
struct nf_conntrack_expect *exp)
{
atomic_notifier_call_chain(&nf_conntrack_expect_chain, event, exp);
atomic_notifier_call_chain(&nf_ct_expect_chain, event, exp);
}
#else /* CONFIG_NF_CONNTRACK_EVENTS */
......@@ -67,9 +67,8 @@ static inline void nf_conntrack_event_cache(enum ip_conntrack_events event,
static inline void nf_conntrack_event(enum ip_conntrack_events event,
struct nf_conn *ct) {}
static inline void nf_ct_deliver_cached_events(const struct nf_conn *ct) {}
static inline void
nf_conntrack_expect_event(enum ip_conntrack_expect_events event,
struct nf_conntrack_expect *exp) {}
static inline void nf_ct_expect_event(enum ip_conntrack_expect_events event,
struct nf_conntrack_expect *exp) {}
static inline void nf_ct_event_cache_flush(void) {}
#endif /* CONFIG_NF_CONNTRACK_EVENTS */
......
......@@ -6,8 +6,8 @@
#define _NF_CONNTRACK_EXPECT_H
#include <net/netfilter/nf_conntrack.h>
extern struct list_head nf_conntrack_expect_list;
extern struct kmem_cache *nf_conntrack_expect_cachep;
extern struct list_head nf_ct_expect_list;
extern struct kmem_cache *nf_ct_expect_cachep;
extern const struct file_operations exp_file_ops;
struct nf_conntrack_expect
......@@ -54,27 +54,27 @@ struct nf_conntrack_expect
struct nf_conntrack_expect *
__nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple);
__nf_ct_expect_find(const struct nf_conntrack_tuple *tuple);
struct nf_conntrack_expect *
nf_conntrack_expect_find_get(const struct nf_conntrack_tuple *tuple);
nf_ct_expect_find_get(const struct nf_conntrack_tuple *tuple);
struct nf_conntrack_expect *
find_expectation(const struct nf_conntrack_tuple *tuple);
nf_ct_find_expectation(const struct nf_conntrack_tuple *tuple);
void nf_ct_unlink_expect(struct nf_conntrack_expect *exp);
void nf_ct_remove_expectations(struct nf_conn *ct);
void nf_conntrack_unexpect_related(struct nf_conntrack_expect *exp);
void nf_ct_unexpect_related(struct nf_conntrack_expect *exp);
/* Allocate space for an expectation: this is mandatory before calling
nf_conntrack_expect_related. You will have to call put afterwards. */
struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me);
void nf_conntrack_expect_init(struct nf_conntrack_expect *, int,
union nf_conntrack_address *,
union nf_conntrack_address *,
u_int8_t, __be16 *, __be16 *);
void nf_conntrack_expect_put(struct nf_conntrack_expect *exp);
int nf_conntrack_expect_related(struct nf_conntrack_expect *expect);
nf_ct_expect_related. You will have to call put afterwards. */
struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me);
void nf_ct_expect_init(struct nf_conntrack_expect *, int,
union nf_conntrack_address *,
union nf_conntrack_address *,
u_int8_t, __be16 *, __be16 *);
void nf_ct_expect_put(struct nf_conntrack_expect *exp);
int nf_ct_expect_related(struct nf_conntrack_expect *expect);
#endif /*_NF_CONNTRACK_EXPECT_H*/
......@@ -209,7 +209,7 @@ static const struct file_operations ct_file_ops = {
/* expects */
static void *exp_seq_start(struct seq_file *s, loff_t *pos)
{
struct list_head *e = &nf_conntrack_expect_list;
struct list_head *e = &nf_ct_expect_list;
loff_t i;
/* strange seq_file api calls stop even if we fail,
......@@ -221,7 +221,7 @@ static void *exp_seq_start(struct seq_file *s, loff_t *pos)
for (i = 0; i <= *pos; i++) {
e = e->next;
if (e == &nf_conntrack_expect_list)
if (e == &nf_ct_expect_list)
return NULL;
}
return e;
......@@ -234,7 +234,7 @@ static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
++*pos;
e = e->next;
if (e == &nf_conntrack_expect_list)
if (e == &nf_ct_expect_list)
return NULL;
return e;
......
......@@ -45,7 +45,7 @@ static unsigned int help(struct sk_buff **pskb,
/* Try to get same port: if not, try to change it. */
for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
exp->tuple.dst.u.tcp.port = htons(port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -57,7 +57,7 @@ static unsigned int help(struct sk_buff **pskb,
matchoff, matchlen,
buffer, strlen(buffer));
if (ret != NF_ACCEPT)
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return ret;
}
......
......@@ -131,7 +131,7 @@ static unsigned int nf_nat_ftp(struct sk_buff **pskb,
/* Try to get same port: if not, try to change it. */
for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
exp->tuple.dst.u.tcp.port = htons(port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -139,7 +139,7 @@ static unsigned int nf_nat_ftp(struct sk_buff **pskb,
return NF_DROP;
if (!mangle[type](pskb, newip, port, matchoff, matchlen, ct, ctinfo)) {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return NF_DROP;
}
return NF_ACCEPT;
......
......@@ -237,12 +237,12 @@ static int nat_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct,
for (nated_port = ntohs(rtp_exp->tuple.dst.u.udp.port);
nated_port != 0; nated_port += 2) {
rtp_exp->tuple.dst.u.udp.port = htons(nated_port);
if (nf_conntrack_expect_related(rtp_exp) == 0) {
if (nf_ct_expect_related(rtp_exp) == 0) {
rtcp_exp->tuple.dst.u.udp.port =
htons(nated_port + 1);
if (nf_conntrack_expect_related(rtcp_exp) == 0)
if (nf_ct_expect_related(rtcp_exp) == 0)
break;
nf_conntrack_unexpect_related(rtp_exp);
nf_ct_unexpect_related(rtp_exp);
}
}
......@@ -261,8 +261,8 @@ static int nat_rtp_rtcp(struct sk_buff **pskb, struct nf_conn *ct,
info->rtp_port[i][dir] = rtp_port;
info->rtp_port[i][!dir] = htons(nated_port);
} else {
nf_conntrack_unexpect_related(rtp_exp);
nf_conntrack_unexpect_related(rtcp_exp);
nf_ct_unexpect_related(rtp_exp);
nf_ct_unexpect_related(rtcp_exp);
return -1;
}
......@@ -299,7 +299,7 @@ static int nat_t120(struct sk_buff **pskb, struct nf_conn *ct,
/* Try to get same port: if not, try to change it. */
for (; nated_port != 0; nated_port++) {
exp->tuple.dst.u.tcp.port = htons(nated_port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -313,7 +313,7 @@ static int nat_t120(struct sk_buff **pskb, struct nf_conn *ct,
if (set_h245_addr(pskb, data, dataoff, taddr,
&ct->tuplehash[!dir].tuple.dst.u3,
htons(nated_port)) < 0) {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return -1;
}
......@@ -347,7 +347,7 @@ static int nat_h245(struct sk_buff **pskb, struct nf_conn *ct,
/* Try to get same port: if not, try to change it. */
for (; nated_port != 0; nated_port++) {
exp->tuple.dst.u.tcp.port = htons(nated_port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -365,7 +365,7 @@ static int nat_h245(struct sk_buff **pskb, struct nf_conn *ct,
info->sig_port[dir] = port;
info->sig_port[!dir] = htons(nated_port);
} else {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return -1;
}
......@@ -433,7 +433,7 @@ static int nat_q931(struct sk_buff **pskb, struct nf_conn *ct,
/* Try to get same port: if not, try to change it. */
for (; nated_port != 0; nated_port++) {
exp->tuple.dst.u.tcp.port = htons(nated_port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -460,7 +460,7 @@ static int nat_q931(struct sk_buff **pskb, struct nf_conn *ct,
info->sig_port[!dir]);
}
} else {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return -1;
}
......@@ -517,7 +517,7 @@ static int nat_callforwarding(struct sk_buff **pskb, struct nf_conn *ct,
/* Try to get same port: if not, try to change it. */
for (nated_port = ntohs(port); nated_port != 0; nated_port++) {
exp->tuple.dst.u.tcp.port = htons(nated_port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -531,7 +531,7 @@ static int nat_callforwarding(struct sk_buff **pskb, struct nf_conn *ct,
if (!set_h225_addr(pskb, data, dataoff, taddr,
&ct->tuplehash[!dir].tuple.dst.u3,
htons(nated_port)) == 0) {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return -1;
}
......
......@@ -55,7 +55,7 @@ static unsigned int help(struct sk_buff **pskb,
/* Try to get same port: if not, try to change it. */
for (port = ntohs(exp->saved_proto.tcp.port); port != 0; port++) {
exp->tuple.dst.u.tcp.port = htons(port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -71,7 +71,7 @@ static unsigned int help(struct sk_buff **pskb,
matchoff, matchlen, buffer,
strlen(buffer));
if (ret != NF_ACCEPT)
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return ret;
}
......
......@@ -81,10 +81,10 @@ static void pptp_nat_expected(struct nf_conn *ct,
DEBUGP("trying to unexpect other dir: ");
NF_CT_DUMP_TUPLE(&t);
other_exp = nf_conntrack_expect_find_get(&t);
other_exp = nf_ct_expect_find_get(&t);
if (other_exp) {
nf_conntrack_unexpect_related(other_exp);
nf_conntrack_expect_put(other_exp);
nf_ct_unexpect_related(other_exp);
nf_ct_expect_put(other_exp);
DEBUGP("success\n");
} else {
DEBUGP("not found!\n");
......
......@@ -278,7 +278,7 @@ static unsigned int ip_nat_sdp(struct sk_buff **pskb,
/* Try to get same port: if not, try to change it. */
for (port = ntohs(exp->saved_proto.udp.port); port != 0; port++) {
exp->tuple.dst.u.udp.port = htons(port);
if (nf_conntrack_expect_related(exp) == 0)
if (nf_ct_expect_related(exp) == 0)
break;
}
......@@ -286,7 +286,7 @@ static unsigned int ip_nat_sdp(struct sk_buff **pskb,
return NF_DROP;
if (!mangle_sdp(pskb, ctinfo, ct, newip, port, dptr)) {
nf_conntrack_unexpect_related(exp);
nf_ct_unexpect_related(exp);
return NF_DROP;
}
return NF_ACCEPT;
......
......@@ -30,7 +30,7 @@ static unsigned int help(struct sk_buff **pskb,
= ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port;
exp->dir = IP_CT_DIR_REPLY;
exp->expectfn = nf_nat_follow_master;
if (nf_conntrack_expect_related(exp) != 0)
if (nf_ct_expect_related(exp) != 0)
return NF_DROP;
return NF_ACCEPT;
}
......
......@@ -142,23 +142,22 @@ static int amanda_help(struct sk_buff **pskb,
if (port == 0 || len > 5)
break;
exp = nf_conntrack_expect_alloc(ct);
exp = nf_ct_expect_alloc(ct);
if (exp == NULL) {
ret = NF_DROP;
goto out;
}
tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
nf_conntrack_expect_init(exp, family,
&tuple->src.u3, &tuple->dst.u3,
IPPROTO_TCP, NULL, &port);
nf_ct_expect_init(exp, family, &tuple->src.u3, &tuple->dst.u3,
IPPROTO_TCP, NULL, &port);
nf_nat_amanda = rcu_dereference(nf_nat_amanda_hook);
if (nf_nat_amanda && ct->status & IPS_NAT_MASK)
ret = nf_nat_amanda(pskb, ctinfo, off - dataoff,
len, exp);
else if (nf_conntrack_expect_related(exp) != 0)
else if (nf_ct_expect_related(exp) != 0)
ret = NF_DROP;
nf_conntrack_expect_put(exp);
nf_ct_expect_put(exp);
}
out:
......
......@@ -494,7 +494,7 @@ init_conntrack(const struct nf_conntrack_tuple *tuple,
}
write_lock_bh(&nf_conntrack_lock);
exp = find_expectation(tuple);
exp = nf_ct_find_expectation(tuple);
if (exp) {
DEBUGP("conntrack: expectation arrives ct=%p exp=%p\n",
conntrack, exp);
......@@ -544,7 +544,7 @@ init_conntrack(const struct nf_conntrack_tuple *tuple,
if (exp) {
if (exp->expectfn)
exp->expectfn(conntrack, exp);
nf_conntrack_expect_put(exp);
nf_ct_expect_put(exp);
}
return &conntrack->tuplehash[IP_CT_DIR_ORIGINAL];
......@@ -961,7 +961,7 @@ void nf_conntrack_cleanup(void)
rcu_assign_pointer(nf_ct_destroy, NULL);
kmem_cache_destroy(nf_conntrack_cachep);
kmem_cache_destroy(nf_conntrack_expect_cachep);
kmem_cache_destroy(nf_ct_expect_cachep);
nf_ct_free_hashtable(nf_conntrack_hash, nf_conntrack_vmalloc,
nf_conntrack_htable_size);
......@@ -1088,10 +1088,10 @@ int __init nf_conntrack_init(void)
goto err_free_hash;
}
nf_conntrack_expect_cachep = kmem_cache_create("nf_conntrack_expect",
nf_ct_expect_cachep = kmem_cache_create("nf_conntrack_expect",
sizeof(struct nf_conntrack_expect),
0, 0, NULL, NULL);
if (!nf_conntrack_expect_cachep) {
if (!nf_ct_expect_cachep) {
printk(KERN_ERR "Unable to create nf_expect slab cache\n");
goto err_free_conntrack_slab;
}
......@@ -1119,7 +1119,7 @@ int __init nf_conntrack_init(void)
out_fini_proto:
nf_conntrack_proto_fini();
out_free_expect_slab:
kmem_cache_destroy(nf_conntrack_expect_cachep);
kmem_cache_destroy(nf_ct_expect_cachep);
err_free_conntrack_slab:
kmem_cache_destroy(nf_conntrack_cachep);
err_free_hash:
......
......@@ -26,8 +26,8 @@
ATOMIC_NOTIFIER_HEAD(nf_conntrack_chain);
EXPORT_SYMBOL_GPL(nf_conntrack_chain);
ATOMIC_NOTIFIER_HEAD(nf_conntrack_expect_chain);
EXPORT_SYMBOL_GPL(nf_conntrack_expect_chain);
ATOMIC_NOTIFIER_HEAD(nf_ct_expect_chain);
EXPORT_SYMBOL_GPL(nf_ct_expect_chain);
DEFINE_PER_CPU(struct nf_conntrack_ecache, nf_conntrack_ecache);
EXPORT_PER_CPU_SYMBOL_GPL(nf_conntrack_ecache);
......@@ -103,14 +103,14 @@ int nf_conntrack_unregister_notifier(struct notifier_block *nb)
}
EXPORT_SYMBOL_GPL(nf_conntrack_unregister_notifier);
int nf_conntrack_expect_register_notifier(struct notifier_block *nb)
int nf_ct_expect_register_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_register(&nf_conntrack_expect_chain, nb);
return atomic_notifier_chain_register(&nf_ct_expect_chain, nb);
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_register_notifier);
EXPORT_SYMBOL_GPL(nf_ct_expect_register_notifier);
int nf_conntrack_expect_unregister_notifier(struct notifier_block *nb)
int nf_ct_expect_unregister_notifier(struct notifier_block *nb)
{
return atomic_notifier_chain_unregister(&nf_conntrack_expect_chain, nb);
return atomic_notifier_chain_unregister(&nf_ct_expect_chain, nb);
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_unregister_notifier);
EXPORT_SYMBOL_GPL(nf_ct_expect_unregister_notifier);
......@@ -26,11 +26,11 @@
#include <net/netfilter/nf_conntrack_helper.h>
#include <net/netfilter/nf_conntrack_tuple.h>
LIST_HEAD(nf_conntrack_expect_list);
EXPORT_SYMBOL_GPL(nf_conntrack_expect_list);
LIST_HEAD(nf_ct_expect_list);
EXPORT_SYMBOL_GPL(nf_ct_expect_list);
struct kmem_cache *nf_conntrack_expect_cachep __read_mostly;
static unsigned int nf_conntrack_expect_next_id;
struct kmem_cache *nf_ct_expect_cachep __read_mostly;
static unsigned int nf_ct_expect_next_id;
/* nf_conntrack_expect helper functions */
void nf_ct_unlink_expect(struct nf_conntrack_expect *exp)
......@@ -43,57 +43,57 @@ void nf_ct_unlink_expect(struct nf_conntrack_expect *exp)
list_del(&exp->list);
NF_CT_STAT_INC(expect_delete);
master_help->expecting--;
nf_conntrack_expect_put(exp);
nf_ct_expect_put(exp);
}
EXPORT_SYMBOL_GPL(nf_ct_unlink_expect);
static void expectation_timed_out(unsigned long ul_expect)
static void nf_ct_expectation_timed_out(unsigned long ul_expect)
{
struct nf_conntrack_expect *exp = (void *)ul_expect;
write_lock_bh(&nf_conntrack_lock);
nf_ct_unlink_expect(exp);
write_unlock_bh(&nf_conntrack_lock);
nf_conntrack_expect_put(exp);
nf_ct_expect_put(exp);
}
struct nf_conntrack_expect *
__nf_conntrack_expect_find(const struct nf_conntrack_tuple *tuple)
__nf_ct_expect_find(const struct nf_conntrack_tuple *tuple)
{
struct nf_conntrack_expect *i;
list_for_each_entry(i, &nf_conntrack_expect_list, list) {
list_for_each_entry(i, &nf_ct_expect_list, list) {
if (nf_ct_tuple_mask_cmp(tuple, &i->tuple, &i->mask))
return i;
}
return NULL;
}
EXPORT_SYMBOL_GPL(__nf_conntrack_expect_find);
EXPORT_SYMBOL_GPL(__nf_ct_expect_find);
/* Just find a expectation corresponding to a tuple. */
struct nf_conntrack_expect *
nf_conntrack_expect_find_get(const struct nf_conntrack_tuple *tuple)
nf_ct_expect_find_get(const struct nf_conntrack_tuple *tuple)
{
struct nf_conntrack_expect *i;
read_lock_bh(&nf_conntrack_lock);
i = __nf_conntrack_expect_find(tuple);
i = __nf_ct_expect_find(tuple);
if (i)
atomic_inc(&i->use);
read_unlock_bh(&nf_conntrack_lock);
return i;
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_find_get);
EXPORT_SYMBOL_GPL(nf_ct_expect_find_get);
/* If an expectation for this connection is found, it gets delete from
* global list then returned. */
struct nf_conntrack_expect *
find_expectation(const struct nf_conntrack_tuple *tuple)
nf_ct_find_expectation(const struct nf_conntrack_tuple *tuple)
{
struct nf_conntrack_expect *exp;
exp = __nf_conntrack_expect_find(tuple);
exp = __nf_ct_expect_find(tuple);
if (!exp)
return NULL;
......@@ -126,10 +126,10 @@ void nf_ct_remove_expectations(struct nf_conn *ct)
if (!help || help->expecting == 0)
return;
list_for_each_entry_safe(i, tmp, &nf_conntrack_expect_list, list) {
list_for_each_entry_safe(i, tmp, &nf_ct_expect_list, list) {
if (i->master == ct && del_timer(&i->timeout)) {
nf_ct_unlink_expect(i);
nf_conntrack_expect_put(i);
nf_ct_expect_put(i);
}
}
}
......@@ -172,32 +172,32 @@ static inline int expect_matches(const struct nf_conntrack_expect *a,
}
/* Generally a bad idea to call this: could have matched already. */
void nf_conntrack_unexpect_related(struct nf_conntrack_expect *exp)
void nf_ct_unexpect_related(struct nf_conntrack_expect *exp)
{
struct nf_conntrack_expect *i;
write_lock_bh(&nf_conntrack_lock);
/* choose the oldest expectation to evict */
list_for_each_entry_reverse(i, &nf_conntrack_expect_list, list) {
list_for_each_entry_reverse(i, &nf_ct_expect_list, list) {
if (expect_matches(i, exp) && del_timer(&i->timeout)) {
nf_ct_unlink_expect(i);
write_unlock_bh(&nf_conntrack_lock);
nf_conntrack_expect_put(i);
nf_ct_expect_put(i);
return;
}
}
write_unlock_bh(&nf_conntrack_lock);
}
EXPORT_SYMBOL_GPL(nf_conntrack_unexpect_related);
EXPORT_SYMBOL_GPL(nf_ct_unexpect_related);
/* We don't increase the master conntrack refcount for non-fulfilled
* conntracks. During the conntrack destruction, the expectations are
* always killed before the conntrack itself */
struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me)
struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me)
{
struct nf_conntrack_expect *new;
new = kmem_cache_alloc(nf_conntrack_expect_cachep, GFP_ATOMIC);
new = kmem_cache_alloc(nf_ct_expect_cachep, GFP_ATOMIC);
if (!new)
return NULL;
......@@ -205,12 +205,12 @@ struct nf_conntrack_expect *nf_conntrack_expect_alloc(struct nf_conn *me)
atomic_set(&new->use, 1);
return new;
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_alloc);
EXPORT_SYMBOL_GPL(nf_ct_expect_alloc);
void nf_conntrack_expect_init(struct nf_conntrack_expect *exp, int family,
union nf_conntrack_address *saddr,
union nf_conntrack_address *daddr,
u_int8_t proto, __be16 *src, __be16 *dst)
void nf_ct_expect_init(struct nf_conntrack_expect *exp, int family,
union nf_conntrack_address *saddr,
union nf_conntrack_address *daddr,
u_int8_t proto, __be16 *src, __be16 *dst)
{
int len;
......@@ -273,28 +273,29 @@ void nf_conntrack_expect_init(struct nf_conntrack_expect *exp, int family,
exp->mask.dst.u.all = 0;
}
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_init);
EXPORT_SYMBOL_GPL(nf_ct_expect_init);
void nf_conntrack_expect_put(struct nf_conntrack_expect *exp)
void nf_ct_expect_put(struct nf_conntrack_expect *exp)
{
if (atomic_dec_and_test(&exp->use))
kmem_cache_free(nf_conntrack_expect_cachep, exp);
kmem_cache_free(nf_ct_expect_cachep, exp);
}
EXPORT_SYMBOL_GPL(nf_conntrack_expect_put);
EXPORT_SYMBOL_GPL(nf_ct_expect_put);
static void nf_conntrack_expect_insert(struct nf_conntrack_expect *exp)
static void nf_ct_expect_insert(struct nf_conntrack_expect *exp)
{
struct nf_conn_help *master_help = nfct_help(exp->master);
atomic_inc(&exp->use);
master_help->expecting++;
list_add