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

porting dhcp additions to ndpi 4.2 stable #5

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

hl33ta
Copy link

@hl33ta hl33ta commented Sep 21, 2022

4.2 iteration of dhcp additions to ndpi


j = ndpi_min(len, sizeof(flow->protos.dhcp.domain_name)-1);

Choose a reason for hiding this comment

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

Is there a reason ndpi_min was used here, but if (len > ...) checks are used in the rest of the code below? I think the code would be clearer if the same approach was used, either:

if (len > sizeof(buf)) len = sizeof(buf);

or

len = ndpi_min(len, sizeof(buf));

I think both should achieve the same thing, and the code will be easier to read because it will be more consistent.

@shla2022
Copy link

Minor suggestion, LGTM.

@shla2022 shla2022 changed the title poritng dhcp additions to ndpi 4.2 stable porting dhcp additions to ndpi 4.2 stable Sep 23, 2022
@spendletonliveaction spendletonliveaction merged commit 5ae8f2a into threateye-4.2 Sep 27, 2022
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.

3 participants