MJL85 / natlas

natlas - Network Discovery and Auto-Diagramming
GNU General Public License v2.0
514 stars 111 forks source link

LLDP discovery fix #19

Open slashrjl opened 7 years ago

slashrjl commented 7 years ago

I was playing around with this on my home network and found the LLDP discovery was failing. the code assumed that the lldpRemTimeMark would be zero, which it may be in cisco switches, but isn't in some other vendor's devices.

Here's the index definition for reference. [Pull request submitted with fix in -- hope I got it right.]

/RjL

lldpRemEntry OBJECT-TYPE
    SYNTAX      LldpRemEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
            "Information about a particular physical network connection.
            Entries may be created and deleted in this table by the agent,
            if a physical topology discovery process is active."
    INDEX   {
           lldpRemTimeMark,
           lldpRemLocalPortNum,
           lldpRemIndex
    }
    ::= { lldpRemTable 1 }