route: check and remove route cache when we get route
authorXin Long <lucien.xin@gmail.com>
Thu, 18 Feb 2016 13:21:19 +0000 (21:21 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:07 +0000 (15:07 -0800)
commit54d77a2201647b826f4be34a95c726dacde1e57b
tree259c86c6eb27502b4afd8f26ffa82f1b8689c986
parentd4775ea09519074dd41039a39dbcb589390ae08f
route: check and remove route cache when we get route

[ Upstream commit deed49df7390d5239024199e249190328f1651e7 ]

Since the gc of ipv4 route was removed, the route cached would has
no chance to be removed, and even it has been timeout, it still could
be used, cause no code to check it's expires.

Fix this issue by checking  and removing route cache when we get route.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/ip_fib.h
net/ipv4/route.c