From 32649733c3943ca3183ff3e31e356d2fc7f8152b Mon Sep 17 00:00:00 2001 From: dgsudharsan Date: Thu, 3 Sep 2020 17:17:31 -0700 Subject: [PATCH] Sflow fixes during DEL processing --- cfgmgr/sflowmgr.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cfgmgr/sflowmgr.cpp b/cfgmgr/sflowmgr.cpp index 98d6a77756..81a76dcec4 100644 --- a/cfgmgr/sflowmgr.cpp +++ b/cfgmgr/sflowmgr.cpp @@ -328,7 +328,10 @@ void SflowMgr::doTask(Consumer &consumer) } sflowCheckAndFillValues(key,values); m_sflowPortConfMap[key].local_conf = true; - m_appSflowSessionTable.set(key, values); + if (m_gEnable) + { + m_appSflowSessionTable.set(key, values); + } } } } @@ -340,6 +343,7 @@ void SflowMgr::doTask(Consumer &consumer) { sflowHandleService(false); sflowHandleSessionAll(false); + sflowHandleSessionLocal(false); } m_gEnable = false; m_appSflowTable.del(key); @@ -350,7 +354,10 @@ void SflowMgr::doTask(Consumer &consumer) { if (!m_intfAllConf) { - sflowHandleSessionAll(true); + if (m_gEnable) + { + sflowHandleSessionAll(true); + } } m_intfAllConf = true; }