ipv4: fix counter in_slow_tot
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Mon, 17 Feb 2014 07:23:43 +0000 (15:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 05:30:04 +0000 (21:30 -0800)
commite82a32af9b911ca79db6820eecb806b4984ba6fc
tree1d4b6f120118f337ded0d13b719cbca6cc89b6bc
parent4380aafddc80b6905ef8f047af80597ec7705e1e
ipv4: fix counter in_slow_tot

[ Upstream commit a6254864c08109c66a194612585afc0439005286 ]

since commit 89aef8921bf("ipv4: Delete routing cache."), the counter
in_slow_tot can't work correctly.

The counter in_slow_tot increase by one when fib_lookup() return successfully
in ip_route_input_slow(), but actually the dst struct maybe not be created and
cached, so we can increase in_slow_tot after the dst struct is created.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/route.c