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

eve: revert ethernet addresses when needed #9715

Closed
wants to merge 1 commit into from

Conversation

regit
Copy link
Contributor

@regit regit commented Oct 30, 2023

Update of #9651

EVE logging has a direction parameter that can cause the logging of an application layer to be done in a direction that is not linked to the packet. As a result the source IP addres could be assigned the MAC address of the destination IP and reverse.

This patch addresses this by propagating the direction to the ethernet logging function and using it there to define the correct mapping.

Issue #6405

Make sure these boxes are signed before submitting your Pull Request -- thank you.

Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/6405

Describe changes:

  • rebase on latest master
  • fix formatting
  • fix netflow logging that was invalid

SV_BRANCH=OISF/suricata-verify#1449

EVE logging has a direction parameter that can cause the logging
of an application layer to be done in a direction that is not linked
to the packet. As a result the source IP addres could be assigned the
MAC address of the destination IP and reverse.

This patch addresses this by propagating the direction to the ethernet
logging function and using it there to define the correct mapping.

Issue OISF#6405
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 16356

Comment on lines +780 to +790
case LOG_DIR_FLOW_TOSERVER:
if
PKT_IS_TOCLIENT(p)
{
src = p->ethh->eth_dst;
dst = p->ethh->eth_src;
}
else {
src = p->ethh->eth_src;
dst = p->ethh->eth_dst;
}
Copy link
Member

Choose a reason for hiding this comment

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

Weird formatting, but it passes the check. When I run the formatting scripts it reformats it back to something more normal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what happened here. I used regular formatting and it was changed to that by clang.

Copy link
Contributor

@catenacyber catenacyber left a comment

Choose a reason for hiding this comment

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

Why is CI so red ?

@catenacyber
Copy link
Contributor

Replaced by #10498 right ?

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