diff options
author | Boris Lytochkin <lytboris@php.net> | 2013-12-20 01:01:41 +0400 |
---|---|---|
committer | Boris Lytochkin <lytboris@php.net> | 2013-12-20 01:01:41 +0400 |
commit | e195faa18f3a553862fcf13f84ae7bca8b6d831c (patch) | |
tree | 8e361c4a40be35d918f849ae3d34e1b4514c67bb | |
parent | 7a402ca51e0940941811eb6e4056ee0f0111eeb0 (diff) | |
parent | 324eb07440156daeabcdd0c02b35fab79c4c5136 (diff) | |
download | php-git-e195faa18f3a553862fcf13f84ae7bca8b6d831c.tar.gz |
Merge branch '5.5' into PHP-5.5
* 5.5:
Fixed SNMP_ERR_TOOBIG handling for bulk walk operations. (Boris Lytochkin)
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/snmp/snmp.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -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) diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 217606aee3..1b634e0cdd 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; |