From: David Ahern <dsah...@kernel.org>
Date: Sun, 25 Aug 2019 07:47:30 -0700

> From: David Ahern <dsah...@gmail.com>
> 
> Donald reported this sequence:
>   ip next add id 1 blackhole
>   ip next add id 2 blackhole
>   ip ro add 1.1.1.1/32 nhid 1
>   ip ro add 1.1.1.2/32 nhid 2
> 
> would cause a crash. Backtrace is:
 ...
> fib_dump_info incorrectly has nhs = 0 for blackhole nexthops, so it
> believes the nexthop object is a multipath group (nhs != 1) and ends
> up down the nexthop_mpath_fill_node() path which is wrong for a
> blackhole.
> 
> The blackhole check in nexthop_num_path is leftover from early days
> of the blackhole implementation which did not initialize the device.
> In the end the design was simpler (fewer special case checks) to set
> the device to loopback in nh_info, so the check in nexthop_num_path
> should have been removed.
> 
> Fixes: 430a049190de ("nexthop: Add support for nexthop groups")
> Reported-by: Donald Sharp <sha...@cumulusnetworks.com>
> Signed-off-by: David Ahern <dsah...@gmail.com>

Applied, thanks David.

Reply via email to