aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-14 01:30:43 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 01:30:43 -0400
commitb9901a84c98fe27c6a598c0f3ec944a7f17a5f97 (patch)
tree42e43b306154705ee17ccb350914e486308040ca /net/dccp
parentf54873982c6aac9bc5c7eef62a9ce4d52b1dfc19 (diff)
[NETNS][DCCPV4]: Make per-net socket lookup.
The inet_lookup family of functions requires a net to lookup a socket in, so give a proper one to them. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 11d0b8589aa7..66f860b1b916 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -211,8 +211,9 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info)
211 return; 211 return;
212 } 212 }
213 213
214 sk = inet_lookup(&init_net, &dccp_hashinfo, iph->daddr, dh->dccph_dport, 214 sk = inet_lookup(dev_net(skb->dev), &dccp_hashinfo,
215 iph->saddr, dh->dccph_sport, inet_iif(skb)); 215 iph->daddr, dh->dccph_dport,
216 iph->saddr, dh->dccph_sport, inet_iif(skb));
216 if (sk == NULL) { 217 if (sk == NULL) {
217 ICMP_INC_STATS_BH(ICMP_MIB_INERRORS); 218 ICMP_INC_STATS_BH(ICMP_MIB_INERRORS);
218 return; 219 return;
@@ -429,7 +430,7 @@ static struct sock *dccp_v4_hnd_req(struct sock *sk, struct sk_buff *skb)
429 if (req != NULL) 430 if (req != NULL)
430 return dccp_check_req(sk, skb, req, prev); 431 return dccp_check_req(sk, skb, req, prev);
431 432
432 nsk = inet_lookup_established(&init_net, &dccp_hashinfo, 433 nsk = inet_lookup_established(sock_net(sk), &dccp_hashinfo,
433 iph->saddr, dh->dccph_sport, 434 iph->saddr, dh->dccph_sport,
434 iph->daddr, dh->dccph_dport, 435 iph->daddr, dh->dccph_dport,
435 inet_iif(skb)); 436 inet_iif(skb));
@@ -810,7 +811,7 @@ static int dccp_v4_rcv(struct sk_buff *skb)
810 811
811 /* Step 2: 812 /* Step 2:
812 * Look up flow ID in table and get corresponding socket */ 813 * Look up flow ID in table and get corresponding socket */
813 sk = __inet_lookup(&init_net, &dccp_hashinfo, 814 sk = __inet_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
814 iph->saddr, dh->dccph_sport, 815 iph->saddr, dh->dccph_sport,
815 iph->daddr, dh->dccph_dport, inet_iif(skb)); 816 iph->daddr, dh->dccph_dport, inet_iif(skb));
816 /* 817 /*