|
@@ -123,7 +123,7 @@ static bool icmp_new(struct nf_conn *ct, const struct sk_buff *skb,
|
|
|
|
|
|
/* Returns conntrack if it dealt with ICMP, and filled in skb fields */
|
|
/* Returns conntrack if it dealt with ICMP, and filled in skb fields */
|
|
static int
|
|
static int
|
|
-icmp_error_message(struct sk_buff *skb,
|
|
|
|
|
|
+icmp_error_message(struct net *net, struct sk_buff *skb,
|
|
enum ip_conntrack_info *ctinfo,
|
|
enum ip_conntrack_info *ctinfo,
|
|
unsigned int hooknum)
|
|
unsigned int hooknum)
|
|
{
|
|
{
|
|
@@ -155,7 +155,7 @@ icmp_error_message(struct sk_buff *skb,
|
|
|
|
|
|
*ctinfo = IP_CT_RELATED;
|
|
*ctinfo = IP_CT_RELATED;
|
|
|
|
|
|
- h = nf_conntrack_find_get(&init_net, &innertuple);
|
|
|
|
|
|
+ h = nf_conntrack_find_get(net, &innertuple);
|
|
if (!h) {
|
|
if (!h) {
|
|
pr_debug("icmp_error_message: no match\n");
|
|
pr_debug("icmp_error_message: no match\n");
|
|
return -NF_ACCEPT;
|
|
return -NF_ACCEPT;
|
|
@@ -172,7 +172,7 @@ icmp_error_message(struct sk_buff *skb,
|
|
|
|
|
|
/* Small and modified version of icmp_rcv */
|
|
/* Small and modified version of icmp_rcv */
|
|
static int
|
|
static int
|
|
-icmp_error(struct sk_buff *skb, unsigned int dataoff,
|
|
|
|
|
|
+icmp_error(struct net *net, struct sk_buff *skb, unsigned int dataoff,
|
|
enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum)
|
|
enum ip_conntrack_info *ctinfo, u_int8_t pf, unsigned int hooknum)
|
|
{
|
|
{
|
|
const struct icmphdr *icmph;
|
|
const struct icmphdr *icmph;
|
|
@@ -217,7 +217,7 @@ icmp_error(struct sk_buff *skb, unsigned int dataoff,
|
|
&& icmph->type != ICMP_REDIRECT)
|
|
&& icmph->type != ICMP_REDIRECT)
|
|
return NF_ACCEPT;
|
|
return NF_ACCEPT;
|
|
|
|
|
|
- return icmp_error_message(skb, ctinfo, hooknum);
|
|
|
|
|
|
+ return icmp_error_message(net, skb, ctinfo, hooknum);
|
|
}
|
|
}
|
|
|
|
|
|
#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
|
|
#if defined(CONFIG_NF_CT_NETLINK) || defined(CONFIG_NF_CT_NETLINK_MODULE)
|