public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Danny Sade <danny@channelot.com>
To: Grant Edwards <grante@visi.com>,
	"ecos-discuss@sources.redhat.com" 
	<ecos-discuss@sources.redhat.com>
Subject: [ECOS] RE: SNMP lockup
Date: Thu, 14 May 2009 08:26:00 -0000	[thread overview]
Message-ID: <EDB04F1999D30A4C8CC2FA320B2855450CC34E3B@exrad4.ad.rad.co.il> (raw)
In-Reply-To: <gu3ls8$rt0$1@ger.gmane.org>

I've tried some other tables of the standard MIB, and found out that access to table
.iso.org.dod.internet.mgmt.mib-2.transmission.dot3.dot3StatsTable.dot3StatsEntry
with index 0 also locks the system.
For example:
snmpget -v 2c -c public -m : 10.10.100.20  .1.3.6.1.2.1.10.7.2.1.6.0

My guess is that there are some more cases like these.  So IMHO fixing
the problem within the agent will be a better solution i.e. the agent
should detect a request for a table entry with index 0 and respond with an error.

Thanks

Danny

 

-----Original Message-----
From: Grant Edwards [mailto:grante@visi.com] 
Sent: Saturday, May 09, 2009 13:28
To: ecos-discuss@sources.redhat.com
Subject: Re: SNMP lockup

On 2009-05-09, Grant Edwards <grante@visi.com> wrote:

>>> What I'd like a pointer on is the interface numbering in SNMP
>>> OIDs.  Are the interfaces supposed to be numbered 1..N with
>>> interface 0 being non-existent?  Or are eCos interface numbers
>>> off by one and they should really be 0,1 instead of 1,2?

After doing some more reading, I've concluded that the
interface numbers are correct.  OIDs for objects that are
single, scalar values end in .0.  OIDs for table entries end in
.1 through .N where the table contains N values.

The correct OID for the first network interface's physical
address should be (and was and still is) 1.3.6.1.2.1.2.2.1.6.1
and the second interface's address is 1.3.6.1.2.1.2.2.1.6.2

Those have always been handled correctly.

The problematic OID, 1.3.6.1.2.1.2.2.1.6.0, does not refer to
the value at "index 0" of the interface physical address table,
but refers to the scalar value identified by 1.3.6.1.2.1.2.2.1.6.

But, 1.3.6.1.2.1.2.2.1.6 isn't a scalar value, it's a table, so
1.3.6.1.2.1.2.2.1.6.0 isn't a valid OID.  AFAICT, error #2 (no
such name) is the appropriate error to return in that case.

That is now handled correctly after my posted fix.

What I'm now wondering is how many problems are waiting to pop
up when a similar requests received for "index 0" of other
table objects?

There also remains the open question of why well-known,
brand-name, hideously-expensive SNMP managers are sending out
that invalid OID...

-- 
Grant


--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  parent reply	other threads:[~2009-05-14  8:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 20:52 [ECOS] " Grant Edwards
2009-05-08 21:22 ` [ECOS] " Grant Edwards
2009-05-08 21:29   ` Grant Edwards
2009-05-08 21:35     ` Grant Edwards
2009-05-08 22:05     ` Grant Edwards
2009-05-08 22:10       ` Sergei Gavrikov
2009-05-08 22:38         ` Grant Edwards
2009-05-08 23:10           ` Sergei Gavrikov
2009-05-08 23:15             ` Gary Thomas
2009-05-08 23:44               ` Sergei Gavrikov
2009-05-09  8:48               ` Grant Edwards
2009-05-09  9:20                 ` Sergei Gavrikov
2009-05-09  9:47                   ` Grant Edwards
2009-05-09 10:28                     ` Grant Edwards
2009-05-09 12:38                       ` Sergei Gavrikov
2009-05-14  8:26                       ` Danny Sade [this message]
2009-05-14 15:03                         ` Grant Edwards
2009-05-14 19:50                         ` Grant Edwards
2009-05-08 22:11       ` Grant Edwards
2009-05-09  8:22       ` Grant Edwards

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=EDB04F1999D30A4C8CC2FA320B2855450CC34E3B@exrad4.ad.rad.co.il \
    --to=danny@channelot.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=grante@visi.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 read-only IMAP folder(s) and NNTP newsgroup(s).