Commit 3a2e86f6 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: nf_nat: remove unused ct arg from lookup functions

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c1c7e44b
...@@ -48,30 +48,26 @@ unsigned int nf_nat_ipv4_in(void *priv, struct sk_buff *skb, ...@@ -48,30 +48,26 @@ unsigned int nf_nat_ipv4_in(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv4_out(void *priv, struct sk_buff *skb, unsigned int nf_nat_ipv4_out(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv4_local_fn(void *priv, unsigned int nf_nat_ipv4_local_fn(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, unsigned int nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct, int nf_nat_icmpv6_reply_translation(struct sk_buff *skb, struct nf_conn *ct,
enum ip_conntrack_info ctinfo, enum ip_conntrack_info ctinfo,
...@@ -81,29 +77,25 @@ unsigned int nf_nat_ipv6_in(void *priv, struct sk_buff *skb, ...@@ -81,29 +77,25 @@ unsigned int nf_nat_ipv6_in(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv6_out(void *priv, struct sk_buff *skb, unsigned int nf_nat_ipv6_out(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv6_local_fn(void *priv, unsigned int nf_nat_ipv6_local_fn(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
unsigned int nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, unsigned int nf_nat_ipv6_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state));
struct nf_conn *ct));
#endif /* _NF_NAT_L3PROTO_H */ #endif /* _NF_NAT_L3PROTO_H */
...@@ -33,8 +33,7 @@ static const struct xt_table nf_nat_ipv4_table = { ...@@ -33,8 +33,7 @@ static const struct xt_table nf_nat_ipv4_table = {
static unsigned int iptable_nat_do_chain(void *priv, static unsigned int iptable_nat_do_chain(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state)
struct nf_conn *ct)
{ {
return ipt_do_table(skb, state, state->net->ipv4.nat_table); return ipt_do_table(skb, state, state->net->ipv4.nat_table);
} }
......
...@@ -246,8 +246,7 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, ...@@ -246,8 +246,7 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
struct nf_conn *ct; struct nf_conn *ct;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
...@@ -285,7 +284,7 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb, ...@@ -285,7 +284,7 @@ nf_nat_ipv4_fn(void *priv, struct sk_buff *skb,
if (!nf_nat_initialized(ct, maniptype)) { if (!nf_nat_initialized(ct, maniptype)) {
unsigned int ret; unsigned int ret;
ret = do_chain(priv, skb, state, ct); ret = do_chain(priv, skb, state);
if (ret != NF_ACCEPT) if (ret != NF_ACCEPT)
return ret; return ret;
...@@ -326,8 +325,7 @@ nf_nat_ipv4_in(void *priv, struct sk_buff *skb, ...@@ -326,8 +325,7 @@ nf_nat_ipv4_in(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
unsigned int ret; unsigned int ret;
__be32 daddr = ip_hdr(skb)->daddr; __be32 daddr = ip_hdr(skb)->daddr;
...@@ -346,8 +344,7 @@ nf_nat_ipv4_out(void *priv, struct sk_buff *skb, ...@@ -346,8 +344,7 @@ nf_nat_ipv4_out(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
#ifdef CONFIG_XFRM #ifdef CONFIG_XFRM
const struct nf_conn *ct; const struct nf_conn *ct;
...@@ -383,8 +380,7 @@ nf_nat_ipv4_local_fn(void *priv, struct sk_buff *skb, ...@@ -383,8 +380,7 @@ nf_nat_ipv4_local_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
const struct nf_conn *ct; const struct nf_conn *ct;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
......
...@@ -28,8 +28,7 @@ ...@@ -28,8 +28,7 @@
static unsigned int nft_nat_do_chain(void *priv, static unsigned int nft_nat_do_chain(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state)
struct nf_conn *ct)
{ {
struct nft_pktinfo pkt; struct nft_pktinfo pkt;
......
...@@ -35,8 +35,7 @@ static const struct xt_table nf_nat_ipv6_table = { ...@@ -35,8 +35,7 @@ static const struct xt_table nf_nat_ipv6_table = {
static unsigned int ip6table_nat_do_chain(void *priv, static unsigned int ip6table_nat_do_chain(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state)
struct nf_conn *ct)
{ {
return ip6t_do_table(skb, state, state->net->ipv6.ip6table_nat); return ip6t_do_table(skb, state, state->net->ipv6.ip6table_nat);
} }
......
...@@ -257,8 +257,7 @@ nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, ...@@ -257,8 +257,7 @@ nf_nat_ipv6_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
struct nf_conn *ct; struct nf_conn *ct;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
...@@ -303,7 +302,7 @@ nf_nat_ipv6_fn(void *priv, struct sk_buff *skb, ...@@ -303,7 +302,7 @@ nf_nat_ipv6_fn(void *priv, struct sk_buff *skb,
if (!nf_nat_initialized(ct, maniptype)) { if (!nf_nat_initialized(ct, maniptype)) {
unsigned int ret; unsigned int ret;
ret = do_chain(priv, skb, state, ct); ret = do_chain(priv, skb, state);
if (ret != NF_ACCEPT) if (ret != NF_ACCEPT)
return ret; return ret;
...@@ -343,8 +342,7 @@ nf_nat_ipv6_in(void *priv, struct sk_buff *skb, ...@@ -343,8 +342,7 @@ nf_nat_ipv6_in(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
unsigned int ret; unsigned int ret;
struct in6_addr daddr = ipv6_hdr(skb)->daddr; struct in6_addr daddr = ipv6_hdr(skb)->daddr;
...@@ -363,8 +361,7 @@ nf_nat_ipv6_out(void *priv, struct sk_buff *skb, ...@@ -363,8 +361,7 @@ nf_nat_ipv6_out(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
#ifdef CONFIG_XFRM #ifdef CONFIG_XFRM
const struct nf_conn *ct; const struct nf_conn *ct;
...@@ -400,8 +397,7 @@ nf_nat_ipv6_local_fn(void *priv, struct sk_buff *skb, ...@@ -400,8 +397,7 @@ nf_nat_ipv6_local_fn(void *priv, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state,
unsigned int (*do_chain)(void *priv, unsigned int (*do_chain)(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state))
struct nf_conn *ct))
{ {
const struct nf_conn *ct; const struct nf_conn *ct;
enum ip_conntrack_info ctinfo; enum ip_conntrack_info ctinfo;
......
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
static unsigned int nft_nat_do_chain(void *priv, static unsigned int nft_nat_do_chain(void *priv,
struct sk_buff *skb, struct sk_buff *skb,
const struct nf_hook_state *state, const struct nf_hook_state *state)
struct nf_conn *ct)
{ {
struct nft_pktinfo pkt; struct nft_pktinfo pkt;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment