netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dsa@cumulusnetworks.com
Cc: netdev@vger.kernel.org, xiaolong.ye@intel.com
Subject: Re: [PATCH net-next] net: ipv6: ignore null_entry on route dumps
Date: Tue, 24 Jan 2017 20:39:32 -0500 (EST)	[thread overview]
Message-ID: <20170124.203932.616922168982477148.davem@davemloft.net> (raw)
In-Reply-To: <95b123db-a760-b73a-a858-9be0516799fc@cumulusnetworks.com>

From: David Ahern <dsa@cumulusnetworks.com>
Date: Tue, 24 Jan 2017 18:35:02 -0700

> On 1/23/17 9:51 AM, David Ahern wrote:
>> On 1/22/17 9:58 PM, David Miller wrote:
>>> David, please slow down.
>>>
>>> How is the NULL entry getting selected to be dumped and passed
>>> down here in the first place?
>> The null_entry might be a 'marker' but is integral to the ipv6 fib.
> 
> As I mentioned in my last response the null_entry is tb6_root.leaf for all tables making it part of the table. Since the dump walks the table and sends each route to rt6_dump_route, the dump includes the null_entry.
> 
> ip6_null_entry->rt6i_idev is NULL because ip6_route_net_init is run before addrconf_init has initialized the loopback device.
> 
> Given that, it seems like a check is needed somewhere ...  be it 'rt == net->ipv6.ip6_null_entry' in rt6_dump_route or fib6_dump_node, or a check for rt6i_idev NULL in rt6_fill_node.
> 
> You marked the last patch as changes needed meaning another needs to be sent.
> 
> Suggestion?

Probably putting the check as high in the call chain as possible, via
fib6_dump_node(), is the best.

Although, it's troubling that we are trying to dump unfinished entries
simply because of initialization order.  It's arguable that this is
the real thing to fix.

The loopback device is a hard dependency which the ipv6 stack has
because of how it does statistics and other things.

  reply	other threads:[~2017-01-25  1:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23  4:56 [PATCH net-next] net: ipv6: ignore null_entry on route dumps David Ahern
2017-01-23  4:58 ` David Miller
2017-01-23 16:51   ` David Ahern
2017-01-25  1:35     ` David Ahern
2017-01-25  1:39       ` David Miller [this message]
2017-01-25  4:07         ` David Ahern

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=20170124.203932.616922168982477148.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dsa@cumulusnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiaolong.ye@intel.com \
    /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).