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

Modify to use the level value of the event implementation instead of directly specifying the level #269

Open
syncpark opened this issue Apr 11, 2024 · 0 comments

Comments

@syncpark
Copy link
Contributor

Change to use the level value from event.level() instead of directly specifying the level.
Like following reference, the level is defined in DnsCovertChannel implementation already.

pub fn count_level(
&self,
counter: &mut HashMap<NonZeroU8, usize>,
locator: Option<Arc<Mutex<ip2location::DB>>>,
filter: &EventFilter,
) -> Result<()> {
let mut level = None;
match self {
Event::DnsCovertChannel(event) => {
if event.matches(locator, filter)?.0 {
level = Some(MEDIUM);
}
}

fn level(&self) -> NonZeroU8 {
MEDIUM
}

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

No branches or pull requests

1 participant