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

config/mt: Add vlan-tuple MT selector #9951

Closed
wants to merge 3 commits into from
Closed

Conversation

jlucovsky
Copy link
Contributor

@jlucovsky jlucovsky commented Dec 2, 2023

Continuation of #9747

Add a new MT selector type to support use cases where a VLAN tuple should be used to determine the MT tenant.

Packets with one VLAN id will never match as vlan-tuple requires at least QinQ.

The tuple can hold up to 3 values -- this is the max supported by Suricata atm.

Tenants are selected by specifying a VLAN tuple, e.g., [1010, 5]. A packet matches when:

  • It has double VLAN encapsulation
  • The outer VLAN id is 1015
  • The inner VLAN id is 5

Wild card values are supported; values of 0 match 'any VLAN' value in the same position as expressed in the tuple:
Tenants are selected by specifying a VLAN tuple, e.g., [1010, 0]. A packet matches when:

  • It has double VLAN encapsulation
  • The outer VLAN id is 1015
  • The inner VLAN id always matches since it's a wildcard value.

Link to redmine ticket: 6237

Describe changes:

  • Add and document a new MT selector -- vlan-tuple -- for use cases where a VLAN pair should determines the tenant.

Updates

  • Documentation fixups per @jufajardini
  • Document default unix command socket filename.

Provide values to any of the below to override the defaults.

To use a pull request use a branch name like pr/N where N is the
pull request number.

Alternatively, SV_BRANCH may also be a link to an
OISF/suricata-verify pull-request.

SV_REPO=
SV_BRANCH=pr/1354
SU_REPO=
SU_BRANCH=
LIBHTP_REPO=
LIBHTP_BRANCH=

Issue: 6237

The VLAN tuple selector uses a tuple of values to select a tenant.
- [ vlan-outermost, vlan-innermost]

The tuple can contain as many VLAN values as supported by Suricata -
currently 3.

Each of these can accept a wild-card value (0).

The tenant is selected by matching packet VLAN values with the selector
values.
Show the default value used for the unix control socket instead of a
generic name that's not used: custom.socket
Copy link

codecov bot commented Dec 2, 2023

Codecov Report

Merging #9951 (d7e526f) into master (9c3ab36) will decrease coverage by 5.05%.
Report is 40 commits behind head on master.
The diff coverage is 18.43%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9951      +/-   ##
==========================================
- Coverage   82.35%   77.31%   -5.05%     
==========================================
  Files         972      970       -2     
  Lines      273060   271448    -1612     
==========================================
- Hits       224870   209859   -15011     
- Misses      48190    61589   +13399     
Flag Coverage Δ
fuzzcorpus ?
suricata-verify 61.52% <18.43%> (+0.43%) ⬆️
unittests 62.85% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 16840

@jlucovsky
Copy link
Contributor Author

Continued in #9952

@jlucovsky jlucovsky closed this Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants