From: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: fib6_del_route has redundant code
Date: Thu, 27 Dec 2007 15:26:46 +0800 [thread overview]
Message-ID: <477353B6.6000102@cn.fujitsu.com> (raw)
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
next reply other threads:[~2007-12-27 7:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 7:26 Gui Jianfeng [this message]
2007-12-28 5:18 ` fib6_del_route has redundant code David Miller
2007-12-28 5:58 ` Gui Jianfeng
2007-12-28 8:15 ` David Miller
2007-12-28 8:25 ` Gui Jianfeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=477353B6.6000102@cn.fujitsu.com \
--to=guijianfeng@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).