diff options
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r-- | net/dccp/ipv4.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 37d27bcb361f..2622ace17c46 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -205,17 +205,18 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) | |||
205 | struct sock *sk; | 205 | struct sock *sk; |
206 | __u64 seq; | 206 | __u64 seq; |
207 | int err; | 207 | int err; |
208 | struct net *net = dev_net(skb->dev); | ||
208 | 209 | ||
209 | if (skb->len < (iph->ihl << 2) + 8) { | 210 | if (skb->len < (iph->ihl << 2) + 8) { |
210 | ICMP_INC_STATS_BH(ICMP_MIB_INERRORS); | 211 | ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); |
211 | return; | 212 | return; |
212 | } | 213 | } |
213 | 214 | ||
214 | sk = inet_lookup(dev_net(skb->dev), &dccp_hashinfo, | 215 | sk = inet_lookup(net, &dccp_hashinfo, |
215 | iph->daddr, dh->dccph_dport, | 216 | iph->daddr, dh->dccph_dport, |
216 | iph->saddr, dh->dccph_sport, inet_iif(skb)); | 217 | iph->saddr, dh->dccph_sport, inet_iif(skb)); |
217 | if (sk == NULL) { | 218 | if (sk == NULL) { |
218 | ICMP_INC_STATS_BH(ICMP_MIB_INERRORS); | 219 | ICMP_INC_STATS_BH(net, ICMP_MIB_INERRORS); |
219 | return; | 220 | return; |
220 | } | 221 | } |
221 | 222 | ||
@@ -229,7 +230,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) | |||
229 | * servers this needs to be solved differently. | 230 | * servers this needs to be solved differently. |
230 | */ | 231 | */ |
231 | if (sock_owned_by_user(sk)) | 232 | if (sock_owned_by_user(sk)) |
232 | NET_INC_STATS_BH(LINUX_MIB_LOCKDROPPEDICMPS); | 233 | NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS); |
233 | 234 | ||
234 | if (sk->sk_state == DCCP_CLOSED) | 235 | if (sk->sk_state == DCCP_CLOSED) |
235 | goto out; | 236 | goto out; |
@@ -238,7 +239,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) | |||
238 | seq = dccp_hdr_seq(dh); | 239 | seq = dccp_hdr_seq(dh); |
239 | if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) && | 240 | if ((1 << sk->sk_state) & ~(DCCPF_REQUESTING | DCCPF_LISTEN) && |
240 | !between48(seq, dp->dccps_swl, dp->dccps_swh)) { | 241 | !between48(seq, dp->dccps_swl, dp->dccps_swh)) { |
241 | NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS); | 242 | NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); |
242 | goto out; | 243 | goto out; |
243 | } | 244 | } |
244 | 245 | ||
@@ -285,7 +286,7 @@ static void dccp_v4_err(struct sk_buff *skb, u32 info) | |||
285 | BUG_TRAP(!req->sk); | 286 | BUG_TRAP(!req->sk); |
286 | 287 | ||
287 | if (seq != dccp_rsk(req)->dreq_iss) { | 288 | if (seq != dccp_rsk(req)->dreq_iss) { |
288 | NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS); | 289 | NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); |
289 | goto out; | 290 | goto out; |
290 | } | 291 | } |
291 | /* | 292 | /* |
@@ -408,9 +409,9 @@ struct sock *dccp_v4_request_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
408 | return newsk; | 409 | return newsk; |
409 | 410 | ||
410 | exit_overflow: | 411 | exit_overflow: |
411 | NET_INC_STATS_BH(LINUX_MIB_LISTENOVERFLOWS); | 412 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); |
412 | exit: | 413 | exit: |
413 | NET_INC_STATS_BH(LINUX_MIB_LISTENDROPS); | 414 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
414 | dst_release(dst); | 415 | dst_release(dst); |
415 | return NULL; | 416 | return NULL; |
416 | } | 417 | } |
@@ -464,7 +465,7 @@ static struct dst_entry* dccp_v4_route_skb(struct net *net, struct sock *sk, | |||
464 | 465 | ||
465 | security_skb_classify_flow(skb, &fl); | 466 | security_skb_classify_flow(skb, &fl); |
466 | if (ip_route_output_flow(net, &rt, &fl, sk, 0)) { | 467 | if (ip_route_output_flow(net, &rt, &fl, sk, 0)) { |
467 | IP_INC_STATS_BH(IPSTATS_MIB_OUTNOROUTES); | 468 | IP_INC_STATS_BH(net, IPSTATS_MIB_OUTNOROUTES); |
468 | return NULL; | 469 | return NULL; |
469 | } | 470 | } |
470 | 471 | ||