detect: add test for vlan keywords - v11#2222
Merged
victorjulien merged 2 commits intoOISF:masterfrom Jan 14, 2025
Merged
Conversation
This was referenced Jan 8, 2025
catenacyber
approved these changes
Jan 9, 2025
Collaborator
catenacyber
left a comment
There was a problem hiding this comment.
Good tests for the suricata PR
5 tasks
567146d to
1600a4f
Compare
Collaborator
|
You just rebased this SV branch, right ? |
| alert ip any any -> any any (msg:"Packet has 3 VLAN layers"; vlan.layers:3; sid:1;) | ||
| alert ip any any -> any any (msg:"Packet has more than 2 VLAN layers"; vlan.layers:>2; sid:2;) | ||
| alert ip any any -> any any (msg:"The number of layers in the packet is not 1"; vlan.layers:!1; sid:3;) | ||
| alert ip any any -> any any (msg:"Packet has 0 VLAN layers"; vlan.layers:0; sid:4;) No newline at end of file |
Member
There was a problem hiding this comment.
so this means no vlan in the packet at all, right?
Can we use the keyword to test for vlan?
vlan.layers:0 meaning no vlan in packet
vlan.layers:>0 meaning there is a vlan header in the packet?
Collaborator
There was a problem hiding this comment.
so this means no vlan in the packet at all, right?
Yes
Can we use the keyword to test for vlan?
vlan.layers:0meaning no vlan in packetvlan.layers:>0meaning there is a vlan header in the packet?
Indeed, how do you like it ?
1600a4f to
41a2c6b
Compare
Contributor
Author
|
just rebased |
5 tasks
catenacyber
approved these changes
Jan 13, 2025
Collaborator
catenacyber
left a comment
There was a problem hiding this comment.
Approving the rebased version
victorjulien
approved these changes
Jan 13, 2025
Member
|
Merged in #2235, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: #1065
Description:
Changes:
counttests fromdetect-vlan-iddirdetect-vlan-layersand add tests forvlan.layerskeyworddetect-vlan-id-1065-v11todetect-vlan-v11Redmine ticket: https://redmine.openinfosecfoundation.org/issues/1065
Previous PR: #2208
Suricata PR: OISF/suricata#12374