diff options
author | Boris Lytochkin <lytboris@php.net> | 2013-12-20 00:26:34 +0400 |
---|---|---|
committer | Boris Lytochkin <lytboris@php.net> | 2013-12-20 00:26:34 +0400 |
commit | b65bd30e89bb1c0dd286d9fd94688cae7da72bf4 (patch) | |
tree | 35eae392d725225693d5fb2813f82d9d0133ea1e | |
parent | 7a402ca51e0940941811eb6e4056ee0f0111eeb0 (diff) | |
parent | bb51d0e4c0940629ff890d498fdcd699d0e5675a (diff) | |
download | php-git-b65bd30e89bb1c0dd286d9fd94688cae7da72bf4.tar.gz |
Merge branch '5.4' into 5.5
* 5.4:
Fixed SNMP_ERR_TOOBIG handling for bulk walk operations
-rw-r--r-- | ext/snmp/snmp.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |