File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3030use App \Models \Device ;
3131use App \Models \PortStack ;
3232use App \Observers \ModuleModelObserver ;
33+ use Illuminate \Support \Facades \Log ;
3334use LibreNMS \DB \SyncsModels ;
3435use LibreNMS \Interfaces \Data \DataStorageInterface ;
3536use LibreNMS \Interfaces \Module ;
@@ -75,7 +76,13 @@ public function discover(OS $os): void
7576 return ;
7677 }
7778
78- $ portStacks = $ data ->mapTable (function ($ data , $ lowIfIndex , $ highIfIndex ) use ($ os ) {
79+ $ portStacks = $ data ->mapTable (function ($ data , $ lowIfIndex , $ highIfIndex = null ) use ($ os ) {
80+ if ($ highIfIndex === null ) {
81+ Log::debug ('Skipping ' . $ lowIfIndex . ' due to bad table index from the device ' );
82+
83+ return null ;
84+ }
85+
7986 if ($ lowIfIndex == '0 ' || $ highIfIndex == '0 ' ) {
8087 return null ; // we don't care about the default entries for ports that have stacking enabled
8188 }
You can’t perform that action at this time.
0 commit comments