aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-04-14 01:33:06 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 01:33:06 -0400
commit671a1c7401c6e48f5f2a77ac330727a13a9c8b63 (patch)
tree9737d14faacc2ee40fb1cc0319f04f487477ded1 /net/dccp/ipv6.c
parent334527d3511ecbffca68d6c8f75046262510cf41 (diff)
[NETNS][DCCPV6]: Make per-net socket lookup.
The inet6_lookup family of functions requires a net to lookup a socket in, so give a proper one to them. No more things to do for dccpv6, since routing is OK and the ipv4-like transport layer filtering is not done for ipv6. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r--net/dccp/ipv6.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index a8666902b8e4..94e0c9495b2c 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -94,7 +94,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
94 int err; 94 int err;
95 __u64 seq; 95 __u64 seq;
96 96
97 sk = inet6_lookup(&init_net, &dccp_hashinfo, &hdr->daddr, dh->dccph_dport, 97 sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo,
98 &hdr->daddr, dh->dccph_dport,
98 &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); 99 &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
99 100
100 if (sk == NULL) { 101 if (sk == NULL) {
@@ -359,7 +360,7 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
359 if (req != NULL) 360 if (req != NULL)
360 return dccp_check_req(sk, skb, req, prev); 361 return dccp_check_req(sk, skb, req, prev);
361 362
362 nsk = __inet6_lookup_established(&init_net, &dccp_hashinfo, 363 nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo,
363 &iph->saddr, dh->dccph_sport, 364 &iph->saddr, dh->dccph_sport,
364 &iph->daddr, ntohs(dh->dccph_dport), 365 &iph->daddr, ntohs(dh->dccph_dport),
365 inet6_iif(skb)); 366 inet6_iif(skb));
@@ -790,8 +791,8 @@ static int dccp_v6_rcv(struct sk_buff *skb)
790 791
791 /* Step 2: 792 /* Step 2:
792 * Look up flow ID in table and get corresponding socket */ 793 * Look up flow ID in table and get corresponding socket */
793 sk = __inet6_lookup(&init_net, &dccp_hashinfo, &ipv6_hdr(skb)->saddr, 794 sk = __inet6_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
794 dh->dccph_sport, 795 &ipv6_hdr(skb)->saddr, dh->dccph_sport,
795 &ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport), 796 &ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport),
796 inet6_iif(skb)); 797 inet6_iif(skb));
797 /* 798 /*