RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 617063 - [TAHI]There's an extra ipaddress length field (16) in some ipaddress related oid.
Summary: [TAHI]There's an extra ipaddress length field (16) in some ipaddress related ...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp
Version: 6.0
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Jan Safranek
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 572236
TreeView+ depends on / blocked
 
Reported: 2010-07-22 06:13 UTC by Xiaoli Tian
Modified: 2010-11-10 11:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 11:55:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaoli Tian 2010-07-22 06:13:16 UTC
Description of problem:
Our net-snmp implementation has an extra ipaddress length field in some oid ip related,but it's not needed according to RFC 4293 p.60.
For example: 
our ipAddressIfIndex is 1.3.6.1.2.1.4.34.1.3.2.16.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163
but TAHI test specification is 1.3.6.1.2.1.4.34.1.3.2.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163.
We have an extra 16.
But according to RFC 4293 p.60 ,the length of this object is the standard length for objects of that type (4 or 16 bytes)

ipAddressPrefixPrefix OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
           "The address prefix.  The address type of this object is
            specified in ipAddressPrefixType.  The length of this object
            is the standard length for objects of that type (4 or 16
            bytes).  Any bits after ipAddressPrefixLength must be zero.

            Implementors need to be aware that, if the size of
            ipAddressPrefixPrefix exceeds 114 octets, then OIDS of
            instances of columns in this row will have more than 128
            sub-identifiers and cannot be accessed using SNMPv1,
            SNMPv2c, or SNMPv3."
    ::= { ipAddressPrefixEntry 3 }
That seem to see there's no need to add extra 16 in the implementation when IP address type(IPv4 or IPv6) can distinguish the protocol difference.

 

Version-Release number of selected component (if applicable):
net-snmp-5.5-23.el6.x86_64
net-snmp-libs-5.5-23.el6.x86_64
net-snmp-utils-5.5-23.el6.x86_64
kernel-2.6.32-47.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Have an extra 16

Expected results:
No 16

Additional info:

Comment 2 RHEL Program Management 2010-07-22 06:37:54 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 3 Jan Safranek 2010-07-22 11:04:22 UTC
I think Net-SNMP is correct in this case. OID 1.3.6.1.2.1.4.34.1.3.2.16.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163 is ipAddressIfIndex.2.16.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163.

Looking at the RFC 4293 (Management Information Base for the Internet Protocol, a.k.a. IP-MIB), it says that ipAddressTable is made of ipAddressEntry rows, which has following indexes:

ipAddressEntry OBJECT-TYPE
    SYNTAX     IpAddressEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
           "An address mapping for a particular interface."
    INDEX { ipAddressAddrType, ipAddressAddr }
    ::= { ipAddressTable 1 }


ipAddressType is a simple integer number (that's the ipAddressIfIndex.*2*)

ipAddressType OBJECT-TYPE
    SYNTAX     INTEGER {
                 unicast(1),
                 anycast(2),
                 broadcast(3)
    }
    MAX-ACCESS read-create
...

And ipAddressAddr has type InetAddress, which is imported from INET-ADDRESS-MIB, RFC 4001:

InetAddress ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION <...>
    SYNTAX      OCTET STRING (SIZE (0..255))

That means InetAddress is an OCTET STRING, with defined minimal and maximal size and special handling when printing it (i.e. IPv4 addresses in nice 127.0.0.1 format, IPv6  in ::1 format, as defined later in the RFC). But still, it's plain OCTET STRING.

And variable-size octet string is encoded into OID as 'length . 1st byte . 2nd byte . 3rd byte . ...', see RFC 2578, chap. 7.7:

(3)  string-valued, variable-length strings (not preceded by the IMPLIED
     keyword):  `n+1' sub-identifiers, where `n' is the length of the
     string (the first sub-identifier is `n' itself, following this,
     each octet of the string is encoded in a separate sub-identifier);

Comment 4 Xiaoli Tian 2010-07-23 01:29:14 UTC
Hi,Jan

Thanks for your hard work to analyse RFCs.As you analysed in Comment 3 ,our  net-snmp implementation is correct,it may be a bug of TAHI.Ok,I will tell TAHI.

xiaoli

(In reply to comment #3)
> I think Net-SNMP is correct in this case. OID
> 1.3.6.1.2.1.4.34.1.3.2.16.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163
> is ipAddressIfIndex.2.16.63.254.5.1.255.255.1.0.2.37.100.255.254.166.254.163.
>

Comment 6 RHEL Program Management 2010-11-10 11:55:06 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.