]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4: Fix peer validation on cached lookup.
authorDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2011 18:21:42 +0000 (13:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2011 18:21:42 +0000 (13:21 -0500)
commit7f4bff661cb42b340072ec21b4abfeb07e8c5fbd
tree2b13b1a58a9cdbdbea44bc4095bf8a2893a38ee5
parentfc98f76155e7241b95b005594dc866ae9f5bdad9
ipv4: Fix peer validation on cached lookup.

If ipv4_valdiate_peer() fails during a cached entry lookup,
we'll NULL derer since the loop iterator assumes rth is not
NULL.

Letting this be handled as a failure is just bogus, so just make it
not fail.  If we have trouble getting a non-NULL neighbour for the
redirected gateway, just restore the original gateway and continue.

The very next use of this cached route will try again.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/route.c