Commit 671a1c74 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by David S. Miller

[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: default avatarPavel Emelyanov <xemul@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 334527d3
...@@ -94,7 +94,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -94,7 +94,8 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
int err; int err;
__u64 seq; __u64 seq;
sk = inet6_lookup(&init_net, &dccp_hashinfo, &hdr->daddr, dh->dccph_dport, sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo,
&hdr->daddr, dh->dccph_dport,
&hdr->saddr, dh->dccph_sport, inet6_iif(skb)); &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
if (sk == NULL) { if (sk == NULL) {
...@@ -359,7 +360,7 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb) ...@@ -359,7 +360,7 @@ static struct sock *dccp_v6_hnd_req(struct sock *sk,struct sk_buff *skb)
if (req != NULL) if (req != NULL)
return dccp_check_req(sk, skb, req, prev); return dccp_check_req(sk, skb, req, prev);
nsk = __inet6_lookup_established(&init_net, &dccp_hashinfo, nsk = __inet6_lookup_established(sock_net(sk), &dccp_hashinfo,
&iph->saddr, dh->dccph_sport, &iph->saddr, dh->dccph_sport,
&iph->daddr, ntohs(dh->dccph_dport), &iph->daddr, ntohs(dh->dccph_dport),
inet6_iif(skb)); inet6_iif(skb));
...@@ -790,8 +791,8 @@ static int dccp_v6_rcv(struct sk_buff *skb) ...@@ -790,8 +791,8 @@ static int dccp_v6_rcv(struct sk_buff *skb)
/* Step 2: /* Step 2:
* Look up flow ID in table and get corresponding socket */ * Look up flow ID in table and get corresponding socket */
sk = __inet6_lookup(&init_net, &dccp_hashinfo, &ipv6_hdr(skb)->saddr, sk = __inet6_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
dh->dccph_sport, &ipv6_hdr(skb)->saddr, dh->dccph_sport,
&ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport), &ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport),
inet6_iif(skb)); inet6_iif(skb));
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment