From 05131216cf0813dba4437795f509608fd9844640 Mon Sep 17 00:00:00 2001 From: thovi-keerthi Date: Sun, 4 Jun 2023 16:26:43 +0530 Subject: [PATCH] Committing development changes to allow EAPOL trap for NAC feature as well along with existing trap --- cfgmgr/coppmgr.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cfgmgr/coppmgr.cpp b/cfgmgr/coppmgr.cpp index 5595096a27..68cd857d96 100644 --- a/cfgmgr/coppmgr.cpp +++ b/cfgmgr/coppmgr.cpp @@ -190,6 +190,15 @@ bool CoppMgr::isTrapIdDisabled(string trap_id) { return false; } + string nac_trap_id("eapol"); + string nac_trap_name("nac"); + if ((trap_id == nac_trap_id) && (isFeatureEnabled(nac_trap_name))) + { + SWSS_LOG_NOTICE("Copp: NAC: isTrapIdDisabled: trap-id %s is enabled:%s", trap_id.c_str(), nac_trap_name.c_str()); + return false; + } + + SWSS_LOG_NOTICE("Copp: isTrapIdDisabled: trap-id %s is disabled: %s", trap_id.c_str(), trap_name.c_str()); return true; }