scapy icon indicating copy to clipboard operation
scapy copied to clipboard

Add align_from attribute to PadField

Open douniwan5788 opened this issue 1 year ago • 4 comments

Checklist:

  • [ ] If you are new to Scapy: I have checked CONTRIBUTING.md (esp. section submitting-pull-requests)
  • [ ] I squashed commits belonging together
  • [ ] I added unit tests or explained why they are not relevant
  • [ ] I executed the regression tests (using cd test && ./run_tests or tox)
  • [ ] If the PR is still not finished, please create a Draft Pull Request

fixes #xxx

douniwan5788 avatar Oct 03 '24 12:10 douniwan5788

@gpotter2 Why would f._align be a tuple? https://github.com/secdev/scapy/blob/c38a5de175be8e59742be473f4fb2dd6edef5503/scapy/packet.py#L2528-L2535

douniwan5788 avatar Oct 04 '24 14:10 douniwan5788

Do you have a use case for this PR? Is there a protocol that needs something like that?

In any case, please add a unit test.

gpotter2 avatar Oct 08 '24 18:10 gpotter2

Do you have a use case for this PR? Is there a protocol that needs something like that?

In any case, please add a unit test.

@gpotter2 Certainly, I will ensure to include the unit test as I work on resolving the bug. Would you kindly explain why f._align is anticipated to be a tuple?

douniwan5788 avatar Oct 10 '24 12:10 douniwan5788

Again,

Is there a protocol that needs something like that?

Regarding

Would you kindly explain why f._align is anticipated to be a tuple?

I honnestly have no idea :) You could try removing it and see if something breaks

gpotter2 avatar Oct 12 '24 12:10 gpotter2

Closing for inactivity.

gpotter2 avatar Sep 24 '25 22:09 gpotter2