netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fib6_del_route has redundant code
@ 2007-12-27  7:26 Gui Jianfeng
  2007-12-28  5:18 ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Gui Jianfeng @ 2007-12-27  7:26 UTC (permalink / raw)
  To: netdev; +Cc: linux-kernel

Hi all,
I think the following code in fib6_del_route in the latest kernel is useless.
1125         if (fn->leaf == NULL && fn->fn_flags&RTN_TL_ROOT)
1126                 fn->leaf = &ip6_null_entry;

ip6_null_entry will never be unlinked from fn->leaf now, that is, fn->leaf == NULL will never meet.

In previous kernel, When adding a default route, ip6_null_entry will be unlinked from fn->leaf.
So, when deleting a default route, it need to check whether the deleted route is the last one,
if so, ip6_null_entry will link to fn->leaf again.

I am not sure if there is another place unlinks ip6_null_entry from fn->leaf.

Regards,
Gui Jiafeng

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-28  8:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27  7:26 fib6_del_route has redundant code Gui Jianfeng
2007-12-28  5:18 ` David Miller
2007-12-28  5:58   ` Gui Jianfeng
2007-12-28  8:15     ` David Miller
2007-12-28  8:25       ` Gui Jianfeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).