[#179] Catch failure to get uptime from device

This commit is contained in:
Oliver Gorwits
2015-01-25 10:06:10 +00:00
parent e03cb75729
commit bb49b695a6
2 changed files with 9 additions and 0 deletions

View File

@@ -4,6 +4,10 @@
* [#171] Log files now rotate at 10MB up to seven times
[ENHANCEMENTS]
* [#179] Catch failure to get uptime from device
[BUG FIXES]
* Another fix for NetAddr::MAC tripping up on v6 addresses

View File

@@ -220,6 +220,11 @@ sub store_interfaces {
# clear the cached uptime and get a new one
my $dev_uptime = $snmp->load_uptime;
if (!defined $dev_uptime) {
error sprintf ' [%s] interfaces - Error! Failed to get uptime from device!',
$device->ip;
return;
}
# used to track how many times the device uptime wrapped
my $dev_uptime_wrapped = 0;