aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_internal.hrl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-12-02 15:20:16 +0100
committerMicael Karlberg <[email protected]>2011-12-21 16:03:55 +0100
commitb4db9877991212cb21f1bf8ac961f5ec3d4f4f1d (patch)
treeb0bfc675c82b38fb05113004bbbbd22ec0293771 /lib/snmp/src/agent/snmpa_internal.hrl
parentf47a80465f1c6811faac0d8b0c4f2d206da6fe0f (diff)
downloadotp-b4db9877991212cb21f1bf8ac961f5ec3d4f4f1d.tar.gz
otp-b4db9877991212cb21f1bf8ac961f5ec3d4f4f1d.tar.bz2
otp-b4db9877991212cb21f1bf8ac961f5ec3d4f4f1d.zip
[snmp] Maximum number of varbinds in a Get-BULK response
As a means to prevent DoS, maximum number of varbinds in a Get-BULK response has been limited. Also, made some changes to the worker process "API". OTP-9700.
Diffstat (limited to 'lib/snmp/src/agent/snmpa_internal.hrl')
-rw-r--r--lib/snmp/src/agent/snmpa_internal.hrl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/snmp/src/agent/snmpa_internal.hrl b/lib/snmp/src/agent/snmpa_internal.hrl
index 9fa874f119..908bb97bd0 100644
--- a/lib/snmp/src/agent/snmpa_internal.hrl
+++ b/lib/snmp/src/agent/snmpa_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -24,6 +24,15 @@
-define(DEFAULT_LOCAL_ENGINE_ID, snmp_framework_mib:get_engine_id()).
+%% -- Max number of VBs in a Get-BULK response --
+%% (( The default value, 1000, is *way* more ))
+%% (( then there is room for in a normal pdu ))
+%% (( (unless the max pdu size has been ))
+%% (( cranked way up), so this value should ))
+%% (( suffice as "infinity" withou actually ))
+%% (( causing memory issues for the VM ... ))
+-define(DEFAULT_GB_MAX_VBS, 1000).
+
-define(snmpa_info(F, A), ?snmp_info("agent", F, A)).
-define(snmpa_warning(F, A), ?snmp_warning("agent", F, A)).
-define(snmpa_error(F, A), ?snmp_error("agent", F, A)).