Respect ignore_interfaces and i_ignore when detecting wrapped device uptime
This commit is contained in:
		| @@ -1,5 +1,9 @@ | ||||
| 2.017001 - | ||||
|  | ||||
|   [ENHANCEMENTS] | ||||
|  | ||||
|   * Respect ignore_interfaces and i_ignore when detecting wrapped device uptime | ||||
|  | ||||
|   [BUG FIXES] | ||||
|  | ||||
|   * Update NodeWireless entries which match both MAC and SSID found, only | ||||
|   | ||||
| @@ -190,11 +190,8 @@ sub store_interfaces { | ||||
|   # clear the cached uptime and get a new one | ||||
|   my $dev_uptime = $snmp->load_uptime; | ||||
|  | ||||
|   if (scalar grep {$_ > $dev_uptime} values %$i_lastchange) { | ||||
|       info sprintf ' [%s] interfaces - device uptime has wrapped - correcting', | ||||
|         $device->ip; | ||||
|       $device->uptime( $dev_uptime + 2**32 ); | ||||
|   } | ||||
|   # used to track whether we've wrapped the device uptime | ||||
|   my $dev_uptime_wrapped = 0; | ||||
|  | ||||
|   # build device interfaces suitable for DBIC | ||||
|   my %interfaces; | ||||
| @@ -220,6 +217,13 @@ sub store_interfaces { | ||||
|           next; | ||||
|       } | ||||
|  | ||||
|       if (not $dev_uptime_wrapped and $i_lastchange->{$entry} > $dev_uptime) { | ||||
|           info sprintf ' [%s] interfaces - device uptime wrapped (%s) - correcting', | ||||
|             $device->ip, $port; | ||||
|           $device->uptime( $dev_uptime + 2**32 ); | ||||
|           $dev_uptime_wrapped = 1; | ||||
|       } | ||||
|  | ||||
|       my $lc = $i_lastchange->{$entry}; | ||||
|       if ($device->is_column_changed('uptime') and $lc) { | ||||
|           if ($lc < $dev_uptime) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user