From bb51d0e4c0940629ff890d498fdcd699d0e5675a Mon Sep 17 00:00:00 2001 From: Boris Lytochkin Date: Fri, 20 Dec 2013 00:25:16 +0400 Subject: Fixed SNMP_ERR_TOOBIG handling for bulk walk operations --- NEWS | 3 +++ ext/snmp/snmp.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 6dea019bc3..9ad1253bf5 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ PHP NEWS - ZIP: . Fixed Bug #66321 (ZipArchive::open() ze_obj->filename_len not real). (Remi) +- SNMP: + . Fixed SNMP_ERR_TOOBIG handling for bulk walk operations (Boris Lytochkin) + 12 Dec 2013, PHP 5.4.23 - Core: diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 1bf0b3a4da..6a4eca5f03 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -896,6 +896,12 @@ retry: keepwalking = 1; } } else { + if (st & SNMP_CMD_WALK && response->errstat == SNMP_ERR_TOOBIG && objid_query->max_repetitions > 1) { /* Answer will not fit into single packet */ + objid_query->max_repetitions /= 2; + snmp_free_pdu(response); + keepwalking = 1; + continue; + } if (!(st & SNMP_CMD_WALK) || response->errstat != SNMP_ERR_NOSUCHNAME || Z_TYPE_P(return_value) == IS_BOOL) { for ( count=1, vars = response->variables; vars && count != response->errindex; -- cgit v1.2.1 From 324eb07440156daeabcdd0c02b35fab79c4c5136 Mon Sep 17 00:00:00 2001 From: Boris Lytochkin Date: Fri, 20 Dec 2013 00:37:29 +0400 Subject: Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin) --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 76657d3edd..7714f31049 100644 --- a/NEWS +++ b/NEWS @@ -38,6 +38,9 @@ PHP NEWS . Fixed reavlidate_path=1 behavior to avoid caching of symlinks values. (Dmitry) +- SNMP: + . Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin) + - SOAP . Fixed bug #66112 (Use after free condition in SOAP extension). (martin dot koegler at brz dot gv dot at) -- cgit v1.2.1