]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Sep 2008 20:51:35 +0000 (13:51 -0700)
commita90bdac23ff3cbc1927e2216f399e40ec8024a92
tree66f11aed70a892a3768d3e0f5100cd4c1c7b6b1e
parentcb703c765b31699b4ca69ac00c7f29e56acbcfba
ipv6: Fix OOPS in ip6_dst_lookup_tail().

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>
net/ipv6/ip6_output.c