diff options
Diffstat (limited to 'net/dccp/ipv6.c')
-rw-r--r-- | net/dccp/ipv6.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index f7fe2a572d7b..b74e8b2cbe55 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -93,8 +93,9 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
93 | struct sock *sk; | 93 | struct sock *sk; |
94 | int err; | 94 | int err; |
95 | __u64 seq; | 95 | __u64 seq; |
96 | struct net *net = dev_net(skb->dev); | ||
96 | 97 | ||
97 | sk = inet6_lookup(dev_net(skb->dev), &dccp_hashinfo, | 98 | sk = inet6_lookup(net, &dccp_hashinfo, |
98 | &hdr->daddr, dh->dccph_dport, | 99 | &hdr->daddr, dh->dccph_dport, |
99 | &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); | 100 | &hdr->saddr, dh->dccph_sport, inet6_iif(skb)); |
100 | 101 | ||
@@ -110,7 +111,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
110 | 111 | ||
111 | bh_lock_sock(sk); | 112 | bh_lock_sock(sk); |
112 | if (sock_owned_by_user(sk)) | 113 | if (sock_owned_by_user(sk)) |
113 | NET_INC_STATS_BH(LINUX_MIB_LOCKDROPPEDICMPS); | 114 | NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS); |
114 | 115 | ||
115 | if (sk->sk_state == DCCP_CLOSED) | 116 | if (sk->sk_state == DCCP_CLOSED) |
116 | goto out; | 117 | goto out; |
@@ -188,7 +189,7 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
188 | BUG_TRAP(req->sk == NULL); | 189 | BUG_TRAP(req->sk == NULL); |
189 | 190 | ||
190 | if (seq != dccp_rsk(req)->dreq_iss) { | 191 | if (seq != dccp_rsk(req)->dreq_iss) { |
191 | NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS); | 192 | NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); |
192 | goto out; | 193 | goto out; |
193 | } | 194 | } |
194 | 195 | ||
@@ -629,9 +630,9 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, | |||
629 | return newsk; | 630 | return newsk; |
630 | 631 | ||
631 | out_overflow: | 632 | out_overflow: |
632 | NET_INC_STATS_BH(LINUX_MIB_LISTENOVERFLOWS); | 633 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); |
633 | out: | 634 | out: |
634 | NET_INC_STATS_BH(LINUX_MIB_LISTENDROPS); | 635 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
635 | if (opt != NULL && opt != np->opt) | 636 | if (opt != NULL && opt != np->opt) |
636 | sock_kfree_s(sk, opt, opt->tot_len); | 637 | sock_kfree_s(sk, opt, opt->tot_len); |
637 | dst_release(dst); | 638 | dst_release(dst); |
@@ -1091,10 +1092,10 @@ static int dccp_v6_init_sock(struct sock *sk) | |||
1091 | return err; | 1092 | return err; |
1092 | } | 1093 | } |
1093 | 1094 | ||
1094 | static int dccp_v6_destroy_sock(struct sock *sk) | 1095 | static void dccp_v6_destroy_sock(struct sock *sk) |
1095 | { | 1096 | { |
1096 | dccp_destroy_sock(sk); | 1097 | dccp_destroy_sock(sk); |
1097 | return inet6_destroy_sock(sk); | 1098 | inet6_destroy_sock(sk); |
1098 | } | 1099 | } |
1099 | 1100 | ||
1100 | static struct timewait_sock_ops dccp6_timewait_sock_ops = { | 1101 | static struct timewait_sock_ops dccp6_timewait_sock_ops = { |