aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_net_if.erl
diff options
context:
space:
mode:
authorNiclas Eklund <[email protected]>2010-08-19 12:00:00 +0200
committerBjörn Gustavsson <[email protected]>2010-08-23 14:12:39 +0200
commit6c00708e21bccffff84595f714cf9c1003cc8916 (patch)
tree78db52866aff0049548a03a7077c094a71faa135 /lib/snmp/src/agent/snmpa_net_if.erl
parentf31b34c4ebf66fb9226047dd1f3cb6fa81a2a6c9 (diff)
downloadotp-6c00708e21bccffff84595f714cf9c1003cc8916.tar.gz
otp-6c00708e21bccffff84595f714cf9c1003cc8916.tar.bz2
otp-6c00708e21bccffff84595f714cf9c1003cc8916.zip
snmp: Patch 1130
OTP-8761 When the function FilterMod:accept_recv/2 returned false the SNMP agent stopped collecting messages from UDP.
Diffstat (limited to 'lib/snmp/src/agent/snmpa_net_if.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_net_if.erl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl
index 3a91cf4033..97a7a63dee 100644
--- a/lib/snmp/src/agent/snmpa_net_if.erl
+++ b/lib/snmp/src/agent/snmpa_net_if.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
+%%
%% Copyright Ericsson AB 2004-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(snmpa_net_if).
@@ -478,12 +478,13 @@ update_req_counter_outgoing(#state{limit = Limit, rcnt = RCnt} = S,
S#state{rcnt = NewRCnt}.
-maybe_handle_recv(#state{filter = FilterMod} = S,
+maybe_handle_recv(#state{usock = Sock, filter = FilterMod} = S,
Ip, Port, Packet) ->
case (catch FilterMod:accept_recv(Ip, Port)) of
false ->
%% Drop the received packet
inc(netIfMsgInDrops),
+ active_once(Sock),
S;
_ ->
handle_recv(S, Ip, Port, Packet)