summaryrefslogtreecommitdiff
path: root/net/netfilter
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-03-25 20:17:13 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-25 20:17:13 -0700
commit212440a7d04a12ee13787afecc6c86c7fc4e6184 (patch)
treeaaf903166f76a5c6d3cabe74465202b5441fee45 /net/netfilter
parent2a6cfb22ae002330d445f734668d9158db9e90de (diff)
[NETFILTER]: nf_conntrack_sip: remove redundant function arguments
The conntrack reference and ctinfo can be derived from the packet. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conntrack_sip.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index fa0d5599ff24..38e1e7a05334 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -37,17 +37,14 @@ module_param(sip_timeout, uint, 0600);
MODULE_PARM_DESC(sip_timeout, "timeout for the master SIP session");
unsigned int (*nf_nat_sip_hook)(struct sk_buff *skb,
- enum ip_conntrack_info ctinfo,
- struct nf_conn *ct,
const char **dptr,
unsigned int *datalen) __read_mostly;
EXPORT_SYMBOL_GPL(nf_nat_sip_hook);
unsigned int (*nf_nat_sdp_hook)(struct sk_buff *skb,
- enum ip_conntrack_info ctinfo,
- struct nf_conntrack_expect *exp,
const char **dptr,
- unsigned int *datalen) __read_mostly;
+ unsigned int *datalen,
+ struct nf_conntrack_expect *exp) __read_mostly;
EXPORT_SYMBOL_GPL(nf_nat_sdp_hook);
static int digits_len(const struct nf_conn *, const char *, const char *, int *);
@@ -367,13 +364,12 @@ int ct_sip_get_info(const struct nf_conn *ct,
EXPORT_SYMBOL_GPL(ct_sip_get_info);
static int set_expected_rtp(struct sk_buff *skb,
- struct nf_conn *ct,
- enum ip_conntrack_info ctinfo,
- union nf_inet_addr *addr,
- __be16 port,
- const char **dptr, unsigned int *datalen)
+ const char **dptr, unsigned int *datalen,
+ union nf_inet_addr *addr, __be16 port)
{
struct nf_conntrack_expect *exp;
+ enum ip_conntrack_info ctinfo;
+ struct nf_conn *ct = nf_ct_get(skb, &ctinfo);
enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
int family = ct->tuplehash[!dir].tuple.src.l3num;
int ret;
@@ -388,7 +384,7 @@ static int set_expected_rtp(struct sk_buff *skb,
nf_nat_sdp = rcu_dereference(nf_nat_sdp_hook);
if (nf_nat_sdp && ct->status & IPS_NAT_MASK)
- ret = nf_nat_sdp(skb, ctinfo, exp, dptr, datalen);
+ ret = nf_nat_sdp(skb, dptr, datalen, exp);
else {
if (nf_ct_expect_related(exp) != 0)
ret = NF_DROP;
@@ -431,7 +427,7 @@ static int sip_help(struct sk_buff *skb,
nf_nat_sip = rcu_dereference(nf_nat_sip_hook);
if (nf_nat_sip && ct->status & IPS_NAT_MASK) {
- if (!nf_nat_sip(skb, ctinfo, ct, &dptr, &datalen)) {
+ if (!nf_nat_sip(skb, &dptr, &datalen)) {
ret = NF_DROP;
goto out;
}
@@ -467,8 +463,8 @@ static int sip_help(struct sk_buff *skb,
ret = NF_DROP;
goto out;
}
- ret = set_expected_rtp(skb, ct, ctinfo, &addr,
- htons(port), &dptr, &datalen);
+ ret = set_expected_rtp(skb, &dptr, &datalen,
+ &addr, htons(port));
}
}
out: