diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-07-16 23:31:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-16 23:31:16 -0400 |
commit | de0744af1fe2d0a3d428f6af0f2fe1f6179b1a9c (patch) | |
tree | 68d02820b1aa13e8fa9743c0ece5930a13d5a205 /net/ipv6 | |
parent | 4e6734447dbc7a0a85e09616821c0782d9fb1141 (diff) |
mib: add net to NET_INC_STATS_BH
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 4 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 6 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index a9cc8ab33a49..00a8a5f9380c 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -210,11 +210,11 @@ unique: | |||
210 | 210 | ||
211 | if (twp != NULL) { | 211 | if (twp != NULL) { |
212 | *twp = tw; | 212 | *twp = tw; |
213 | NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED); | 213 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); |
214 | } else if (tw != NULL) { | 214 | } else if (tw != NULL) { |
215 | /* Silly. Should hash-dance instead... */ | 215 | /* Silly. Should hash-dance instead... */ |
216 | inet_twsk_deschedule(tw, death_row); | 216 | inet_twsk_deschedule(tw, death_row); |
217 | NET_INC_STATS_BH(LINUX_MIB_TIMEWAITRECYCLED); | 217 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITRECYCLED); |
218 | 218 | ||
219 | inet_twsk_put(tw); | 219 | inet_twsk_put(tw); |
220 | } | 220 | } |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 3ecc1157994e..6a68eeb7bbf8 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -137,7 +137,7 @@ __u32 cookie_v6_init_sequence(struct sock *sk, struct sk_buff *skb, __u16 *mssp) | |||
137 | ; | 137 | ; |
138 | *mssp = msstab[mssind] + 1; | 138 | *mssp = msstab[mssind] + 1; |
139 | 139 | ||
140 | NET_INC_STATS_BH(LINUX_MIB_SYNCOOKIESSENT); | 140 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESSENT); |
141 | 141 | ||
142 | return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, | 142 | return secure_tcp_syn_cookie(&iph->saddr, &iph->daddr, th->source, |
143 | th->dest, ntohl(th->seq), | 143 | th->dest, ntohl(th->seq), |
@@ -177,11 +177,11 @@ struct sock *cookie_v6_check(struct sock *sk, struct sk_buff *skb) | |||
177 | 177 | ||
178 | if (time_after(jiffies, tp->last_synq_overflow + TCP_TIMEOUT_INIT) || | 178 | if (time_after(jiffies, tp->last_synq_overflow + TCP_TIMEOUT_INIT) || |
179 | (mss = cookie_check(skb, cookie)) == 0) { | 179 | (mss = cookie_check(skb, cookie)) == 0) { |
180 | NET_INC_STATS_BH(LINUX_MIB_SYNCOOKIESFAILED); | 180 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESFAILED); |
181 | goto out; | 181 | goto out; |
182 | } | 182 | } |
183 | 183 | ||
184 | NET_INC_STATS_BH(LINUX_MIB_SYNCOOKIESRECV); | 184 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_SYNCOOKIESRECV); |
185 | 185 | ||
186 | /* check for timestamp cookie support */ | 186 | /* check for timestamp cookie support */ |
187 | memset(&tcp_opt, 0, sizeof(tcp_opt)); | 187 | memset(&tcp_opt, 0, sizeof(tcp_opt)); |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d58b83ac06fb..ca5b93a5c02a 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -340,7 +340,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
340 | 340 | ||
341 | bh_lock_sock(sk); | 341 | bh_lock_sock(sk); |
342 | if (sock_owned_by_user(sk)) | 342 | if (sock_owned_by_user(sk)) |
343 | NET_INC_STATS_BH(LINUX_MIB_LOCKDROPPEDICMPS); | 343 | NET_INC_STATS_BH(net, LINUX_MIB_LOCKDROPPEDICMPS); |
344 | 344 | ||
345 | if (sk->sk_state == TCP_CLOSE) | 345 | if (sk->sk_state == TCP_CLOSE) |
346 | goto out; | 346 | goto out; |
@@ -349,7 +349,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
349 | seq = ntohl(th->seq); | 349 | seq = ntohl(th->seq); |
350 | if (sk->sk_state != TCP_LISTEN && | 350 | if (sk->sk_state != TCP_LISTEN && |
351 | !between(seq, tp->snd_una, tp->snd_nxt)) { | 351 | !between(seq, tp->snd_una, tp->snd_nxt)) { |
352 | NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS); | 352 | NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); |
353 | goto out; | 353 | goto out; |
354 | } | 354 | } |
355 | 355 | ||
@@ -424,7 +424,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, | |||
424 | BUG_TRAP(req->sk == NULL); | 424 | BUG_TRAP(req->sk == NULL); |
425 | 425 | ||
426 | if (seq != tcp_rsk(req)->snt_isn) { | 426 | if (seq != tcp_rsk(req)->snt_isn) { |
427 | NET_INC_STATS_BH(LINUX_MIB_OUTOFWINDOWICMPS); | 427 | NET_INC_STATS_BH(net, LINUX_MIB_OUTOFWINDOWICMPS); |
428 | goto out; | 428 | goto out; |
429 | } | 429 | } |
430 | 430 | ||
@@ -1449,9 +1449,9 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1449 | return newsk; | 1449 | return newsk; |
1450 | 1450 | ||
1451 | out_overflow: | 1451 | out_overflow: |
1452 | NET_INC_STATS_BH(LINUX_MIB_LISTENOVERFLOWS); | 1452 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS); |
1453 | out: | 1453 | out: |
1454 | NET_INC_STATS_BH(LINUX_MIB_LISTENDROPS); | 1454 | NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS); |
1455 | if (opt && opt != np->opt) | 1455 | if (opt && opt != np->opt) |
1456 | sock_kfree_s(sk, opt, opt->tot_len); | 1456 | sock_kfree_s(sk, opt, opt->tot_len); |
1457 | dst_release(dst); | 1457 | dst_release(dst); |