diff options
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 06006a5ac8b9..75c2def8f9a0 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -160,6 +160,9 @@ rescan: | |||
160 | __inet_twsk_del_dead_node(tw); | 160 | __inet_twsk_del_dead_node(tw); |
161 | spin_unlock(&twdr->death_lock); | 161 | spin_unlock(&twdr->death_lock); |
162 | __inet_twsk_kill(tw, twdr->hashinfo); | 162 | __inet_twsk_kill(tw, twdr->hashinfo); |
163 | #ifdef CONFIG_NET_NS | ||
164 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITED); | ||
165 | #endif | ||
163 | inet_twsk_put(tw); | 166 | inet_twsk_put(tw); |
164 | killed++; | 167 | killed++; |
165 | spin_lock(&twdr->death_lock); | 168 | spin_lock(&twdr->death_lock); |
@@ -178,8 +181,9 @@ rescan: | |||
178 | } | 181 | } |
179 | 182 | ||
180 | twdr->tw_count -= killed; | 183 | twdr->tw_count -= killed; |
181 | NET_ADD_STATS_BH(LINUX_MIB_TIMEWAITED, killed); | 184 | #ifndef CONFIG_NET_NS |
182 | 185 | NET_ADD_STATS_BH(&init_net, LINUX_MIB_TIMEWAITED, killed); | |
186 | #endif | ||
183 | return ret; | 187 | return ret; |
184 | } | 188 | } |
185 | 189 | ||
@@ -372,6 +376,9 @@ void inet_twdr_twcal_tick(unsigned long data) | |||
372 | &twdr->twcal_row[slot]) { | 376 | &twdr->twcal_row[slot]) { |
373 | __inet_twsk_del_dead_node(tw); | 377 | __inet_twsk_del_dead_node(tw); |
374 | __inet_twsk_kill(tw, twdr->hashinfo); | 378 | __inet_twsk_kill(tw, twdr->hashinfo); |
379 | #ifdef CONFIG_NET_NS | ||
380 | NET_INC_STATS_BH(twsk_net(tw), LINUX_MIB_TIMEWAITKILLED); | ||
381 | #endif | ||
375 | inet_twsk_put(tw); | 382 | inet_twsk_put(tw); |
376 | killed++; | 383 | killed++; |
377 | } | 384 | } |
@@ -395,7 +402,9 @@ void inet_twdr_twcal_tick(unsigned long data) | |||
395 | out: | 402 | out: |
396 | if ((twdr->tw_count -= killed) == 0) | 403 | if ((twdr->tw_count -= killed) == 0) |
397 | del_timer(&twdr->tw_timer); | 404 | del_timer(&twdr->tw_timer); |
398 | NET_ADD_STATS_BH(LINUX_MIB_TIMEWAITKILLED, killed); | 405 | #ifndef CONFIG_NET_NS |
406 | NET_ADD_STATS_BH(&init_net, LINUX_MIB_TIMEWAITKILLED, killed); | ||
407 | #endif | ||
399 | spin_unlock(&twdr->death_lock); | 408 | spin_unlock(&twdr->death_lock); |
400 | } | 409 | } |
401 | 410 | ||