-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix FlagsField & dissection improvements #2035
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2035 +/- ##
==========================================
+ Coverage 86.31% 86.32% +0.01%
==========================================
Files 197 197
Lines 44468 44492 +24
==========================================
+ Hits 38383 38409 +26
+ Misses 6085 6083 -2
|
gpotter2
left a comment
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.
Some comments for the reviewers
test/regression.uts
Outdated
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.
This also made very little sense: it abuses the bugs in __iter__ to generate a list of packets, whereas it should only have been a flag field.
scapy/packet.py
Outdated
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.
For some reason I missed that: (0, 5) makes 6 values... -_-
scapy/packet.py
Outdated
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.
This is actually quite a big improvement: in fact hasattr calls __getattr__ under the hood, which calls getfieldval => we actually did getfieldval twice each time.
scapy/contrib/ibeacon.uts
Outdated
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.
This was triggered by the FlagsField bug
|
@p-l- can you review this PR? |
a3f22b8 to
184b8b4
Compare
This is a part of #1999 that can be fast tracked.
This PR:
FlagsFieldvery weird behavior:before (?!?!)
after
hasattrclear_cache()work on subpackets