-
Notifications
You must be signed in to change notification settings - Fork 1.6k
detect/vlan: move vlan.id code to generic integer #13908
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
base: main
Are you sure you want to change the base?
detect/vlan: move vlan.id code to generic integer #13908
Conversation
) -> *mut DetectUintData<u32> { | ||
let ft_name: &CStr = CStr::from_ptr(ustr); //unsafe | ||
if let Ok(s) = ft_name.to_str() { | ||
// TODO big composite type |
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.
just removed a TODO that was done on my way
v->u8[1] = a->layer; | ||
v->u16[2] = a->du16.arg1; | ||
v->u16[3] = a->du16.arg2; | ||
const DetectVlanIdDataPrefilter a = SCDetectVlanIdPrefilter(smctx); |
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.
I wonder if I should move more prefilter code to rust :
- not export
DetectVlanIdDataPrefilter
to C - pass
PrefilterPacketHeaderValue *v
from C to rust as a slice of bytes that has at least 16 bytes
u8_layer | ||
match a.index { | ||
DetectUintIndex::All => { | ||
// keep previous behavior that vlan.id: all matched only if there was vlan |
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.
How is this ?
Alternative could be to change the newly (Suri9) added all
modes :
We could have all
that behaves like for vlan.id, and all0
that would match if everything is a match or if the list is empty...
No new SV tests as, just exercising the existing Not sure if it makes sense to add a check like
|
Draft : waiting on feedback about the all vs all1-all0 |
WARNING:
Pipeline = 27714 |
WARNING:
Pipeline = 27727 |
Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7929
Describe changes: