Skip to content

LLDP: add IEEE 802.1Q and 802.1AX org-specific TLVs#4970

Open
ali-keys wants to merge 1 commit intosecdev:masterfrom
ali-keys:lldp-ieee8021-tlvs
Open

LLDP: add IEEE 802.1Q and 802.1AX org-specific TLVs#4970
ali-keys wants to merge 1 commit intosecdev:masterfrom
ali-keys:lldp-ieee8021-tlvs

Conversation

@ali-keys
Copy link
Copy Markdown

Hi everyone,

This PR adds 15 new org-specific TLVs for IEEE 802.1Q:

  • Port VLAN ID (PVID)
  • Port and Protocol VLAN ID (PPVID)
  • VLAN Name
  • Protocol Identity
  • VID Usage Digest
  • Management VID
  • Link Aggregation (this TLV is from 802.1AX)
  • Congestion Notification
  • ETS Configuration
  • ETS Recommendation
  • PFC Configuration
  • Application Priority
  • EVB
  • CDCP
  • Application VLAN

First, I wanted to implement only the ones that I needed (VLAN stuff), but then decided to implement all of them.
The code has been written mostly by AI. I've reviewed and corrected every line of it.

@polydroi
Copy link
Copy Markdown

Thanks for the PR.

Could you please check if it is possible to add interoperability tests with existing tools or libraries, such as lldpd, to the unit tests.

@ali-keys
Copy link
Copy Markdown
Author

ali-keys commented Apr 20, 2026

Thanks for the PR.

Could you please check if it is possible to add interoperability tests with existing tools or libraries, such as lldpd, to the unit tests.

Hi Nils,

by interoperability tests you mean: Making a real environment -> capturing everything -> writing tests based on the pcaps to make sure it gets parsed correctly? Like the last test (Wireshark sample: Summit300-48*)?

* https://github.com/secdev/scapy/pull/4970/changes#diff-cd75a14a55c0b70a338abe750de68641d9a5c2c43acee32f99291161bb66100eR1689-R1742

@polydroi
Copy link
Copy Markdown

No, those tests are also important, but if possible I have something like this in mind.

Start lldpd with a certain configuration in a subprocess,
Start your test code that interacts with lldpd. Evaluate the test.
Stop the subprocess.

In this way we can automatically verify the interaction with a real world application/libray.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 98.75000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.82%. Comparing base (5009233) to head (0c153b2).
⚠️ Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
scapy/contrib/lldp.py 98.75% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4970      +/-   ##
==========================================
- Coverage   80.31%   79.82%   -0.50%     
==========================================
  Files         381      381              
  Lines       93630    93770     +140     
==========================================
- Hits        75202    74849     -353     
- Misses      18428    18921     +493     
Files with missing lines Coverage Δ
scapy/contrib/lldp.py 96.21% <98.75%> (+1.58%) ⬆️

... and 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants