Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Always make a backup of a module prior to editing it.  In order to prevent Net::SNMP from failing due to this error we edited it in the following fashion.

Code Block
$2544 diff -bu SNMP.pm.original SNMP.pm.patched 
--- SNMP.pm.original    2018-01-26 08:36:28.833348881 +0900
+++ SNMP.pm.patched if (($this->{_security}->discovered) &&
2545     2018-01-26 14:25:42.798070662 +0900
@@ -2617,8 +2617,9 @@
($this->{_error} =~ /usmStatsNotInTimeWindows/))
2546    #{
2547 counter in the varBindList..."  If another $this->_error is returned, we 
_clear;
2548 
2549       # assume that theDEBUG_INFO('discovery and synchronization has failed.
complete');
2550 
-2551   if (($this->{_security}->discovered()) &&
-  # Discovery is complete,  ($this->{_error} =~ /usmStatsNotInTimeWindows/))
+send any pending messages
2552   if ($this->{_security}->discovered())
+   #ifwhile (my $q = shift(@{$this->{_discovery_securityqueue}}->discovered()) &&
+{
2553      #    ($this->{_error} =~ /usmStatsNotInTimeWindows/))
$DISPATCHER->send_pdu(@{$q});
2554    {
   }
2555 
2556   $this->_error_clear();
     return  DEBUG_INFO('discovery and synchronization complete');
@@ -2628,10 +2629,10 @@
TRUE;
2557    }
2558 
2559    # If we received the usmStatsNotInTimeWindows report or no error, but 
2560    # we are still not synchronized, provide a generic error message.
2561 
-2562    if ((!$this->{_error}) || ($this->{_error} =~ /usmStatsNotInTimeWindows/)) {
-2563       $this->_error_clear();
-2564       $this->_error('Time synchronization failed during discovery');
-   }
+   #if ((!$this->{_error}) || ($this->{_error} =~ /usmStatsNotInTimeWindows/)) {
+   #   $this->_error_clear();
+   #   $this->_error('Time synchronization failed during discovery');
+   #}
 
    DEBUG_INFO('synchronization failed');2565    }