From: David Miller <davem@davemloft•net>
To: weid@nanjing-fnst•com
Cc: netdev@vger•kernel.org
Subject: Re: [patch] Fix SNMPv2 "ipOutNoRoutes" counter error
Date: Sun, 10 Dec 2006 22:48:48 -0800 (PST) [thread overview]
Message-ID: <20061210.224848.55508191.davem@davemloft.net> (raw)
In-Reply-To: <1165337386.2545.4.camel@LINE>
From: weidong <weid@nanjing-fnst•com>
Date: Tue, 05 Dec 2006 11:49:46 -0500
> Hi All:
> When I tested linux kernel 2.6.18.3, and find that kernel statistics
> about IPSTATS_MIB_OUTNOROUTES which exsits in file /proc/net/snmp
> doesn't increase correctly. The criteria conform to RFC2011:
>
> ipOutNoRoutes OBJECT-TYPE
> SYNTAX Counter32
> MAX-ACCESS read-only
> STATUS current
> DESCRIPTION
> "The number of IP datagrams discarded because no route could
> be found to transmit them to their destination. Note that
> this counter includes any packets counted in ipForwDatagrams
> which meet this `no-route' criterion. Note that this
> includes any datagrams which a host cannot route because all
> of its default routers are down."
> ::= { ip 12 }
>
> When a host received an IP packet, but the destination address is not
> this host. The kernel just discards the IP packet but with no increment
> for this counter.
>
> When a router received an IP packet that this router can't forward due
> to no route found. Kernel just simply invoke ip_error(), and send ICMP
> packet. Also do nothing for this counter.
>
> Signed-off-by: Wei Dong <weid@nanjing-fnst•com>
Hosts which have forwarding disabled, are not forwarding and
therefore not routing in the sense being described here.
So bumping this counter when the ip_forward sysctl is "0" makes
no sense.
We are not even getting to the "output" path when the route lookup
fails in ip_rcv_finish(). This means this silly SNMP "output" route
failed counter will get bumped like crazy when promiscuous mode is
enabled on an interface, and that makes zero sense.
This patch, at least in it's current form, is not correct.
prev parent reply other threads:[~2006-12-11 6:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-04 7:10 [patch] Fix SNMPv2 "ipOutNoRoutes" counter error weidong
2006-12-11 6:48 ` David Miller [this message]
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=20061210.224848.55508191.davem@davemloft.net \
--to=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
--cc=weid@nanjing-fnst$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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