Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 617063 - [TAHI]There's an extra ipaddress length field (16) in some ipaddress related oid.
[TAHI]There's an extra ipaddress length field (16) in some ipaddress related ...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: net-snmp (Show other bugs)
All Linux
high Severity medium
: rc
: ---
Assigned To: Jan Safranek
BaseOS QE Security Team
Depends On:
Blocks: 572236
  Show dependency treegraph
Reported: 2010-07-22 02:13 EDT by Xiaoli Tian
Modified: 2010-11-10 06:55 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-11-10 06:55:06 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Xiaoli Tian 2010-07-22 02:13:16 EDT
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
but TAHI test specification is
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
           "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):

How reproducible:

Steps to Reproduce:
Actual results:
Have an extra 16

Expected results:
No 16

Additional info:
Comment 2 RHEL Product and Program Management 2010-07-22 02:37:54 EDT
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 07:04:22 EDT
I think Net-SNMP is correct in this case. OID is ipAddressIfIndex.

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
           "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
    MAX-ACCESS read-create

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

    STATUS current
    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 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-22 21:29:14 EDT

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.


(In reply to comment #3)
> I think Net-SNMP is correct in this case. OID
> is ipAddressIfIndex.
Comment 6 RHEL Product and Program Management 2010-11-10 06:55:06 EST
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.