Arduino_SNMP
Arduino_SNMP copied to clipboard
Issue when GoSNMP library uses the default MaxRepetitions=50
Hi I had an issue with Arduino locking up when using the GoSNMP library doing a bulkwalk. After some testing it was found that the default MaxRepititions=50 in the GoSNMP library made the Arduino to crash. I did a simple patch in the SNMPParser.cpp
@@ -63,10 +63,6 @@
pass = false;
globalError = GEN_ERR;
} else {
- // These three lines are needed to make big bulkwalk possible, without memory will be thrashed and the Arduino will stop working
- if ( request.errorIndex.maxRepititions > 10 ){
- request.errorIndex.maxRepititions = 10;
- }
pass = handleGetBulkRequestPDU(callbacks, request.varbindList, outResponseList, request.errorStatus.nonRepeaters, request.errorIndex.maxRepititions);
handleStatus = SNMP_GETBULK_OCCURRED;
}
@@ -112,4 +108,4 @@
}
return handleStatus;
-}
+}
For me it seems to fix the crashing issue even when MaxRepititions=50 Best regards Assar W.
Hey there, could you make a PR with this change?