Bugzilla – Full Text Bug Listing |
Summary: | CsmaNetDevice calls ReceiveErrorModel too late | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Florian Schmidt <Florian.Schmidt> |
Component: | devices | Assignee: | Craig Dowell <craigdo> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | tomh |
Priority: | P3 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
patch to fix the bug
revised patch |
Description
Florian Schmidt
2009-11-12 04:49:58 UTC
Created attachment 653 [details]
patch to fix the bug
This is a small patch to fix the bug. Not sure it's the most beautiful solution, especially with the duplicated header/trailer removal in both branches, but it changes as little as possible of the code. If this is not acceptable, I can rewrite the section slightly more to eliminate the duplication.
Patched code compiles, and in my testing setup, the PER now seems to match the expected rate.
(In reply to comment #1) > Created an attachment (id=653) [details] > patch to fix the bug > > This is a small patch to fix the bug. Not sure it's the most beautiful > solution, especially with the duplicated header/trailer removal in both > branches, but it changes as little as possible of the code. If this is not > acceptable, I can rewrite the section slightly more to eliminate the > duplication. > Patched code compiles, and in my testing setup, the PER now seems to match the > expected rate. I agree that this bug needs fixed. It pointed out another problem, too, which is that the m_phyRxDropTrace inconsistently gets a packet with an Ethernet header in one call above this code block, and without the header in the error model call. Attached is a patch which fixes also the drop trace issue, and removes the long else clause. Created attachment 654 [details]
revised patch
Craig, please review and push if you are OK with this. |