Skip to content

Pad packet when needed#91

Merged
guedou merged 2 commits into
secdev:masterfrom
p-l-:fix-90
Mar 24, 2016
Merged

Pad packet when needed#91
guedou merged 2 commits into
secdev:masterfrom
p-l-:fix-90

Conversation

@p-l-
Copy link
Copy Markdown
Member

@p-l- p-l- commented Mar 20, 2016

This fixes #90.

@p-l- p-l- added the bug label Mar 20, 2016
@p-l- p-l- self-assigned this Mar 20, 2016
@p-l- p-l- assigned guedou and unassigned p-l- Mar 21, 2016
@p-l-
Copy link
Copy Markdown
Member Author

p-l- commented Mar 21, 2016

Now ready!

Comment thread scapy/config.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you choose 60 ?

According to the page linked in issue #90 this value could be lower. For example, on my laptop sendp("A"*15) works fine while sendp("A"*14) fails. 15 is indeed equal to len(str(Ether())). I wonder if it could be computed dynamically.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not the case for every driver, I have one example where 58 bytes are needed.

I don't think that more than 60 bytes could be needed, since that is the minimum ethernet length, and I think it's fine to have the value set to 60 by default as it can be easily configured.

Also, I have not found a way to find this value dynamically (other than by bisecting, and I don't think that trying multiple values is a good option).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@guedou I have updated the description on #90 to give more information.

@p-l-
Copy link
Copy Markdown
Member Author

p-l- commented Mar 22, 2016

@guedou agreed! fixed.

@p-l-
Copy link
Copy Markdown
Member Author

p-l- commented Mar 23, 2016

Now fixed and ready to merge!

@guedou guedou merged commit 40d37f9 into secdev:master Mar 24, 2016
@p-l- p-l- deleted the fix-90 branch March 24, 2016 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux: (ethernet) padding no longer automatically added

2 participants