[erlang-bugs] Error in SNMP TAddress type handling

Stefan Zegenhagen <>
Fri Jan 24 10:41:27 CET 2014


Dear all,

Erlang's SNMP implementation errorneously handles the TAddress type used
in, e.g. SNMP-TARGET-MIB::snmpTargetAddrTAddress and
SNMP-COMMUNITY-MIB::snmpTargetAddrTMask for IPv6 addresses.

The MIB says that TAddress is of base type OCTET STRING. For IPv6
addresses, however, the current implementation in erlang expects a list
of 8 integers in range 0 ... 0xFFFF as IP address (plus 2 bytes for the
port number) instead of the required list of 16 integers in range 0 ...
0xFF.

Since snmpTargetAddrTable and snmpTargetAddrExtTable (which include the
mentioned objects) are used for managing SNMP trap receivers, this bug
is particularly nasty as it prevents managing the trap receiver table
via SNMP for IPv6. Any attempt to read from or write to
snmpTargetAddrTable with IPv6 addresses result in errors due to the
datatype mismatch.

Functions that need fixing are:
      * snmpa_mpd.erl:transform_taddr() which transforms the MIB values
        to IP addresses when sending traps
      * snmp_conf:check_taddress() which is used to validate TAddress
        types received via SNMP set requests
      * snmp_conf:check_ip() which is used to validate
        snmpTargetAddrTable data from config files.


Kind regards,

-- 
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: 
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

-- 
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: 
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.



More information about the erlang-bugs mailing list