diff options
author | Gao feng <gaofeng@cn.fujitsu.com> | 2012-06-07 21:21:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-08 17:27:23 -0400 |
commit | 54db0cc2ba0d38166acc2d6bae21721405305537 (patch) | |
tree | 9c067a1e7be7e3f2c862b3d64568ba330a0e0b2c /net/ipv4/ip_fragment.c | |
parent | c8a627ed06d6d49bf65015a2185c519335c4c83f (diff) |
inetpeer: add parameter net for inet_getpeer_v4,v6
add struct net as a parameter of inet_getpeer_v[4,6],
use net to replace &init_net.
and modify some places to provide net for inet_getpeer_v[4,6]
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r-- | net/ipv4/ip_fragment.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 9dbd3dd6022d..22c6bab9717a 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
@@ -171,6 +171,10 @@ static void frag_kfree_skb(struct netns_frags *nf, struct sk_buff *skb) | |||
171 | static void ip4_frag_init(struct inet_frag_queue *q, void *a) | 171 | static void ip4_frag_init(struct inet_frag_queue *q, void *a) |
172 | { | 172 | { |
173 | struct ipq *qp = container_of(q, struct ipq, q); | 173 | struct ipq *qp = container_of(q, struct ipq, q); |
174 | struct netns_ipv4 *ipv4 = container_of(q->net, struct netns_ipv4, | ||
175 | frags); | ||
176 | struct net *net = container_of(ipv4, struct net, ipv4); | ||
177 | |||
174 | struct ip4_create_arg *arg = a; | 178 | struct ip4_create_arg *arg = a; |
175 | 179 | ||
176 | qp->protocol = arg->iph->protocol; | 180 | qp->protocol = arg->iph->protocol; |
@@ -180,7 +184,7 @@ static void ip4_frag_init(struct inet_frag_queue *q, void *a) | |||
180 | qp->daddr = arg->iph->daddr; | 184 | qp->daddr = arg->iph->daddr; |
181 | qp->user = arg->user; | 185 | qp->user = arg->user; |
182 | qp->peer = sysctl_ipfrag_max_dist ? | 186 | qp->peer = sysctl_ipfrag_max_dist ? |
183 | inet_getpeer_v4(arg->iph->saddr, 1) : NULL; | 187 | inet_getpeer_v4(net, arg->iph->saddr, 1) : NULL; |
184 | } | 188 | } |
185 | 189 | ||
186 | static __inline__ void ip4_frag_free(struct inet_frag_queue *q) | 190 | static __inline__ void ip4_frag_free(struct inet_frag_queue *q) |