Skip to content

Add support for 802.1Q VLANs#3479

Merged
scaprile merged 2 commits intomasterfrom
vlans
Apr 1, 2026
Merged

Add support for 802.1Q VLANs#3479
scaprile merged 2 commits intomasterfrom
vlans

Conversation

@scaprile
Copy link
Copy Markdown
Collaborator

@scaprile scaprile commented Mar 24, 2026

  • VLAN 0 does not exist, so there's no need to do anything when VLANs are not used; the struct is initialized to 0 so when vlanid = 0, there is no 802.1Q tag added.
  • Improves the L2 API (again), the header and trailer functions must be able to access the config in order to create the proper header/trailer fields and return the proper size; in this case the 802.1Q tag but there are other L2 that can have different formats
  • Introduces the l2data member to ifc, in order to hold L2 specific configuration, and state (state is necessary in (for example, at least on) PPPoE, will be moved from statics to this struct in a future commit)
  • Many changes are due to a rename: _footer --> _trailer and reformatting
  • enable_crc_check --> enable_fcs_check. This one and enable_mac_check stay where they are, as they can be used by many L2 and this avoids duplication. However, some (weird) combinations of L2 over L2 might require having different configs; when that will be the case, they can be moved

Happily tested PPPoE on a VLAN

@scaprile scaprile requested review from cpq and robertc2000 March 24, 2026 19:57
@scaprile scaprile marked this pull request as draft March 24, 2026 19:57
@scaprile scaprile force-pushed the l2 branch 3 times, most recently from 42f22ce to 0459b65 Compare March 31, 2026 19:56
@scaprile scaprile marked this pull request as ready for review April 1, 2026 17:53
@scaprile scaprile changed the base branch from l2 to master April 1, 2026 17:53
@scaprile scaprile force-pushed the vlans branch 2 times, most recently from 8c09333 to b7b948e Compare April 1, 2026 18:15
@scaprile scaprile merged commit 4ff5b60 into master Apr 1, 2026
58 of 64 checks passed
@scaprile scaprile deleted the vlans branch April 1, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants