diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-10-08 05:35:05 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 05:35:05 -0400 |
commit | 74c51a1497033e6ff7b8096797daca233a4a30df (patch) | |
tree | cc5491a6e2cfcc71742e76226fcede365deba114 /net/ipv4 | |
parent | a702a65fc1376fc1f6757ec2a6960348af3f1876 (diff) |
netfilter: netns nf_conntrack: pass netns pointer to L4 protocol's ->error hook
Again, it's deducible from skb, but we're going to use it for
nf_conntrack_checksum and statistics, so just pass it from upper layer.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_proto_icmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c index daf346377b6..8c7ed5bc959 100644 --- a/net/ipv4/netfilter/nf_conntrack_proto_icmp.c +++ b/net/ipv4/netfilter/nf_conntrack_proto_icmp.c | |||
@@ -123,7 +123,7 @@ static bool icmp_new(struct nf_conn *ct, const struct sk_buff *skb, | |||
123 | 123 | ||
124 | /* Returns conntrack if it dealt with ICMP, and filled in skb fields */ | 124 | /* Returns conntrack if it dealt with ICMP, and filled in skb fields */ |
125 | static int | 125 | static int |
126 | icmp_error_message(struct sk_buff *skb, | 126 | icmp_error_message(struct net *net, struct sk_buff *skb, |
127 | enum ip_conntrack_info *ctinfo, | 127 | enum ip_conntrack_info *ctinfo, |
128 | unsigned int hooknum) | 128 | unsigned int hooknum) |
129 | { | 129 | { |
@@ -155,7 +155,7 @@ icmp_error_message(struct sk_buff *skb, | |||
155 | 155 | ||
156 | *ctinfo = IP_CT_RELATED; | 156 | *ctinfo = IP_CT_RELATED; |
157 | 157 | ||
158 | h = nf_conntrack_find_get(&init_net, &innertuple); | 158 | h = nf_conntrack_find_get(net, &innertuple); |
159 | if (!h) { | 159 | if (!h) { |
160 | pr_debug("icmp_error_message: no match\n"); | 160 | pr_debug("icmp_error_message: no match\n"); |
161 | return -NF_ACCEPT; | 161 | return -NF_ACCEPT; |
@@ -172,7 +172,7 @@ icmp_error_message(struct sk_buff *skb, | |||
172 | 172 | ||
173 | /* Small and modified version of icmp_rcv */ | 173 | /* Small and modified version of icmp_rcv */ |
174 | static int | 174 | static int |
175 | icmp_error(struct sk_buff *skb, unsigned int dataoff, | 175 | icmp_error(struct net *net, struct sk_buff *skb, unsigned int dataoff, |
176 | enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum) | 176 | enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum) |
177 | { | 177 | { |
178 | const struct icmphdr *icmph; | 178 | const struct icmphdr *icmph; |
@@ -217,7 +217,7 @@ icmp_error(struct sk_buff *skb, unsigned int dataoff, | |||
217 | && icmph->type != ICMP_REDIRECT) | 217 | && icmph->type != ICMP_REDIRECT) |
218 | return NF_ACCEPT; | 218 | return NF_ACCEPT; |
219 | 219 | ||
220 | return icmp_error_message(skb, ctinfo, hooknum); | 220 | return icmp_error_message(net, skb, ctinfo, hooknum); |
221 | } | 221 | } |
222 | 222 | ||
223 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) | 223 | #if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE) |