[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180108191552.uqf2diwcsjw5q3ze@kafai-mbp.dhcp.thefacebook.com>
Date: Mon, 8 Jan 2018 11:15:53 -0800
From: Martin KaFai Lau <kafai@...com>
To: Wei Wang <weiwan@...gle.com>
CC: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net v2] ipv6: remove null_entry before adding default
route
On Mon, Jan 08, 2018 at 10:34:00AM -0800, Wei Wang wrote:
> From: Wei Wang <weiwan@...gle.com>
>
> In the current code, when creating a new fib6 table, tb6_root.leaf gets
> initialized to net->ipv6.ip6_null_entry.
> If a default route is being added with rt->rt6i_metric = 0xffffffff,
> fib6_add() will add this route after net->ipv6.ip6_null_entry. As
> null_entry is shared, it could cause problem.
>
> In order to fix it, set fn->leaf to NULL before calling
> fib6_add_rt2node() when trying to add the first default route.
> And reset fn->leaf to null_entry when adding fails or when deleting the
> last default route.
Thanks for the fix!
Acked-by: Martin KaFai Lau <kafai@...com>
Powered by blists - more mailing lists