Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COPP]Fix coppmgr when there are multiple features using same trap #42

Closed
wants to merge 1 commit into from

Conversation

dgsudharsan
Copy link
Owner

What I did
Fix coppmgr when there are multiple feature tables using same trap.

In addition fixed the following issues

  1. When a new feature is added which is not present during the init, the copp entry will not get programmed.
  2. When a copp trap attribute is set, it overrides the other existing attributes

Why I did it
Fix copp issues

How I verified it
Added UT to verify
Details if related

@@ -183,14 +183,13 @@ bool CoppMgr::isTrapIdDisabled(string trap_id)
{
return false;
}
break;
if (isFeatureEnabled(trap_name))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So basically, to install a Trap we are checking if any of the dependent features are enabled. Previously the assumption is a 1<->1 mapping between trap and feature. Correct me if i'm wrong

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct. Now if any feature containing the trap is enabled the trap should be installed. Recently there is a new feature pac which uses eapol trap same as macsec. But if macsec is not enabled this feature didn't work as trap is getting installed with only macsec. With this change the issue will be resolved.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, sounds good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants