Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-7481

DrayTek Vigor2820 Series agent bug: zero-length IpAddress instance ID

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 15.0.1
    • Fix Version/s: 15.0.2, 16.0.0
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Environment:
      Any with SNMP nodes having sysObjectID .1.3.6.1.4.1.7367 (DrayTek Corporation, Router Model: Vigor2820 Series).

      Description

      These dodgy agents sometimes return results from the ipAddrTable with an instance ID of 0 rather than a valid IP address:

      IP-MIB::ipAdEntAddr.0 = IpAddress: 0.0.0.0
      IP-MIB::ipAdEntIfIndex.0 = INTEGER: 5
      IP-MIB::ipAdEntNetMask.0 = IpAddress: 0.0.0.0
      IP-MIB::ipAdEntBcastAddr.0 = INTEGER: 1
      IP-MIB::ipAdEntReasmMaxSize.0 = INTEGER: 0
      

      Instead of the following, which is at least valid even if still suspect:

      IP-MIB::ipAdEntAddr.0.0.0.0 = IpAddress: 0.0.0.0
      IP-MIB::ipAdEntIfIndex.0.0.0.0 = INTEGER: 5
      IP-MIB::ipAdEntNetMask.0.0.0.0 = IpAddress: 0.0.0.0
      IP-MIB::ipAdEntBcastAddr.0.0.0.0 = INTEGER: 1
      IP-MIB::ipAdEntReasmMaxSize.0.0.0.0 = INTEGER: 0
      

      This results in an exception thrown when we try to process these instances:

      java.io.IOException: IpAddress encoding error, wrong length: 0
              at org.snmp4j.smi.IpAddress.decodeBER(IpAddress.java:169)
              at org.snmp4j.smi.AbstractVariable.createFromBER
      (AbstractVariable.java:172)
              at org.snmp4j.smi.VariableBinding.decodeBER
      (VariableBinding.java:191)
              at org.snmp4j.PDU.decodeBER(PDU.java:573)
              at org.snmp4j.mp.MPv2c.prepareDataElements(MPv2c.java:201)
              at org.snmp4j.MessageDispatcherImpl.dispatchMessage
      (MessageDispatcherImpl.java:277)
              at org.snmp4j.MessageDispatcherImpl.processMessage
      (MessageDispatcherImpl.java:373)
              at org.snmp4j.MessageDispatcherImpl.processMessage
      (MessageDispatcherImpl.java:333)
              at org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage
      (AbstractTransportMapping.java:76)
              at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run
      (DefaultUdpTransportMapping.java:414)
              at java.lang.Thread.run(Thread.java:745)
      

        Attachments

          Activity

            People

            • Assignee:
              jeffg Jeff Gehlbach
              Reporter:
              jeffg Jeff Gehlbach
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: