[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <477353B6.6000102@cn.fujitsu.com>
Date: Thu, 27 Dec 2007 15:26:46 +0800
From: Gui Jianfeng <guijianfeng@...fujitsu.com>
To: netdev@...r.kernel.org
CC: linux-kernel@...r.kernel.org
Subject: fib6_del_route has redundant code
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists