From b4db9877991212cb21f1bf8ac961f5ec3d4f4f1d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Fri, 2 Dec 2011 15:20:16 +0100 Subject: [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. --- lib/snmp/src/agent/snmpa_internal.hrl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/snmp/src/agent/snmpa_internal.hrl') 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)). -- cgit v1.2.3 From c4a1020847a7d08be9696bb41a666e36cdf4206c Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 5 Dec 2011 14:40:21 +0100 Subject: [snmp] Be more verbose in the worker procs Add a verbosity printout for results of the requests sent to it). Also fixed handling sent_trap and appup. OTP-9700 --- lib/snmp/src/agent/snmpa_internal.hrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/snmp/src/agent/snmpa_internal.hrl') diff --git a/lib/snmp/src/agent/snmpa_internal.hrl b/lib/snmp/src/agent/snmpa_internal.hrl index 908bb97bd0..671a3e4aaf 100644 --- a/lib/snmp/src/agent/snmpa_internal.hrl +++ b/lib/snmp/src/agent/snmpa_internal.hrl @@ -29,9 +29,9 @@ %% (( 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 )) +%% (( suffice as "infinity" without actually )) %% (( causing memory issues for the VM ... )) --define(DEFAULT_GB_MAX_VBS, 1000). +-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)). -- cgit v1.2.3