-
Notifications
You must be signed in to change notification settings - Fork 91
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
detect: add test for vlan keywords - v11 #2222
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good tests for the suricata PR
567146d
to
1600a4f
Compare
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;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this means no vlan in the packet at all, right?
Yes
Can we use the keyword to test for vlan?
vlan.layers:0
meaning no vlan in packetvlan.layers:>0
meaning there is a vlan header in the packet?
Indeed, how do you like it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me.
1600a4f
to
41a2c6b
Compare
just rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the rebased version
Merged in #2235, thanks! |
Ticket: #1065
Description:
Changes:
count
tests fromdetect-vlan-id
dirdetect-vlan-layers
and add tests forvlan.layers
keyworddetect-vlan-id-1065-v11
todetect-vlan-v11
Redmine ticket: https://redmine.openinfosecfoundation.org/issues/1065
Previous PR: #2208
Suricata PR: OISF/suricata#12374