mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: "Pudak, Filip" <Filip.Pudak@windriver.com>,
	"Xiao, Jiguang" <Jiguang.Xiao@windriver.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"yoshfuji@linux-ipv6.org" <yoshfuji@linux-ipv6.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: This counter "ip6InNoRoutes" does not follow the RFC4293 specification implementation
Date: Thu, 31 Mar 2022 08:13:24 -0600	[thread overview]
Message-ID: <47987a0e-0626-04f8-b181-ff3bc257a269@kernel.org> (raw)
In-Reply-To: <PH0PR11MB5096F84F64CF00C996F219DAE4E19@PH0PR11MB5096.namprd11.prod.outlook.com>

On 3/31/22 3:13 AM, Pudak, Filip wrote:
> Hi David,
> 
> So we end up in ip6_pkt_discard -> ip6_pkt_drop :
> 
> ---
> if (netif_is_l3_master(skb->dev) &&
> 	    dst->dev == net->loopback_dev)

That's a bug. I can not think of a case where those 2 conditions will
ever be true at the same time. I think that should '||'


> 		idev = __in6_dev_get_safely(dev_get_by_index_rcu(net, IP6CB(skb)->iif));
> 	else
> 		idev = ip6_dst_idev(dst);
> 
> 	switch (ipstats_mib_noroutes) {
> 	case IPSTATS_MIB_INNOROUTES:
> 		type = ipv6_addr_type(&ipv6_hdr(skb)->daddr);
> 		if (type == IPV6_ADDR_ANY) {
> 			IP6_INC_STATS(net, idev, IPSTATS_MIB_INADDRERRORS);
> 			break;
> 		}
> 		fallthrough;
> 	case IPSTATS_MIB_OUTNOROUTES:
> 		IP6_INC_STATS(net, idev, ipstats_mib_noroutes);
> 		break;
> 	}
> 
> ---
> What happens in the case where the l3mdev is not used, is that we go into the else branch(idev = ip6_dst_idev(dst);) and then we can see that the counter is incremented on the loopback IF.
> 
> So is the only option that l3mdev should be used or is it strange to expect that the idev where the INNOROUTES should increment is the ingress device by default in this case?
> 


  reply	other threads:[~2022-03-31 14:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <SJ0PR11MB51207CBDB5145A89B8A0A15393359@SJ0PR11MB5120.namprd11.prod.outlook.com>
     [not found] ` <SJ0PR11MB51202FA2365341740048A64593359@SJ0PR11MB5120.namprd11.prod.outlook.com>
     [not found]   ` <SJ0PR11MB51209200786235187572EE0D93359@SJ0PR11MB5120.namprd11.prod.outlook.com>
     [not found]     ` <SJ0PR11MB5120426D474963E08936DD2493359@SJ0PR11MB5120.namprd11.prod.outlook.com>
2022-02-17  2:59       ` David Ahern
2022-02-24  9:04         ` Xiao, Jiguang
2022-03-09  2:16           ` Xiao, Jiguang
2022-03-09  4:50             ` David Ahern
2022-03-31  9:13               ` Pudak, Filip
2022-03-31 14:13                 ` David Ahern [this message]
2022-04-04  7:09                   ` Pudak, Filip
2022-04-04 15:09                     ` 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=47987a0e-0626-04f8-b181-ff3bc257a269@kernel.org \
    --to=dsahern@kernel.org \
    --cc=Filip.Pudak@windriver.com \
    --cc=Jiguang.Xiao@windriver.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.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

all inboxes | Powered by JetHome®