bluetooth: parse every advertising set in Set_Extended_Advertise_Enable - #5094
Open
mmadersbacher wants to merge 1 commit into
Open
bluetooth: parse every advertising set in Set_Extended_Advertise_Enable#5094mmadersbacher wants to merge 1 commit into
mmadersbacher wants to merge 1 commit into
Conversation
Extended_Advertise_Set does not override extract_padding, so the first set claims the remaining sets as its payload and PacketListField stops after one entry. A command with num_sets=2 dissected into len(sets)==1, with the second set left in sets[0].payload as Raw. HCI_LE_Meta_Extended_Advertising_Report already does this in the same module. AI-Assisted: yes (Claude Code)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5094 +/- ##
==========================================
+ Coverage 79.42% 79.78% +0.35%
==========================================
Files 372 372
Lines 96507 96562 +55
==========================================
+ Hits 76652 77042 +390
+ Misses 19855 19520 -335
🚀 New features to boost your workflow:
|
polybassa
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
HCI_Cmd_LE_Set_Extended_Advertise_Enable.setsreturns a single entry no matter whatnum_setssays.Extended_Advertise_Setdoes not overrideextract_padding, so the first set claims the following sets as its payload andPacketListFieldfinds nothing left to parse.After the change
len(p.sets) == 2and the second set readshandle=2 duration=200 max_events=10. Rebuilding returns the same bytes either way.HCI_LE_Meta_Extended_Advertising_Reportalready carries the sameextract_paddingfurther down the module.Validated on Windows with Python 3.13.
UTscapy -t test/scapy/layers/bluetooth.utsgives 90 passed, 0 failed, with two cases added for two sets and one set.flake8 scapy/andmypy_check.py(win32 and linux) are clean. The fullwindows.utsccampaign gives 96 failures, the same count and the same files as on master, all unrelated and caused by missing tcpdump, tshark and libpcap here.