]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ipv6: Fix OOPS in ip6_dst_lookup_tail().
authorNeil Horman <nhorman@tuxdriver.com>
Tue, 9 Sep 2008 20:51:35 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Oct 2008 03:23:06 +0000 (20:23 -0700)
commit1e4c1698a4f5f177f9a1d83921e8341de0798968
tree9a6d480450f8763806d8004a0ce579d6008b6195
parent9c44da042826e2db05f21a4d2fe8df468d82e24f
ipv6: Fix OOPS in ip6_dst_lookup_tail().

[ Upstream commit e550dfb0c2c31b6363aa463a035fc9f8dcaa3c9b ]

This fixes kernel bugzilla 11469: "TUN with 1024 neighbours:
ip6_dst_lookup_tail NULL crash"

dst->neighbour is not necessarily hooked up at this point
in the processing path, so blindly dereferencing it is
the wrong thing to do.  This NULL check exists in other
similar paths and this case was just an oversight.

Also fix the completely wrong and confusing indentation
here while we're at it.

Based upon a patch by Evgeniy Polyakov.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv6/ip6_output.c