File 0800-snmp-agent-Discovery-cleanup.patch of Package erlang

From 857f529baab354d77b3a1e834412d2f9d9eb0723 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Mon, 28 Oct 2019 13:00:09 +0100
Subject: [PATCH] [snmp|agent] Discovery cleanup

If there is no receiver of INFORM then #state.reqs in
snmpa_net_if keeps on growing for DISCOVERY.
For normal INFORM the #state.reqs are cleaned up by
'EXIT' messages (Asko Husso)

OTP-16228
---
 lib/snmp/src/agent/snmpa_net_if.erl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/snmp/src/agent/snmpa_net_if.erl b/lib/snmp/src/agent/snmpa_net_if.erl
index eefe864ac6..730d096920 100644
--- a/lib/snmp/src/agent/snmpa_net_if.erl
+++ b/lib/snmp/src/agent/snmpa_net_if.erl
@@ -1,7 +1,7 @@
 %%
 %% %CopyrightBegin%
 %% 
-%% Copyright Ericsson AB 2004-2018. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2019. All Rights Reserved.
 %% 
 %% Licensed under the Apache License, Version 2.0 (the "License");
 %% you may not use this file except in compliance with the License.
@@ -1033,6 +1033,7 @@ handle_send_discovery(
 		    log(Log, Type, Packet, {Domain, Address}),
 		    udp_send(Socket, {Domain, Address}, Packet),
 		    ?vtrace("handle_send_discovery -> sent (~w)", [ReqId]),
+                    link(From),
 		    NReqs  = snmp_misc:keyreplaceadd(From, 2, Reqs, {ReqId, From}),
                     NReqs2 = (NReqs -- [{0, From}]) ++ [{0, From}], % OTP-16207
 		    S#state{reqs = NReqs2}
-- 
2.16.4

openSUSE Build Service is sponsored by