Bug 731 - Send function in point-to-point-net-device fails to check the return value of the Dequeue function
Send function in point-to-point-net-device fails to check the return value of...
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: devices
ns-3-dev
All All
: P5 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-26 05:44 EDT by Alberto Blanc
Modified: 2010-02-05 13:11 EST (History)
3 users (show)

See Also:


Attachments
patch to fix (1.28 KB, patch)
2010-01-08 18:33 EST, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alberto Blanc 2009-10-26 05:44:36 EDT
In the Send function when the queue is empty (m_txMachineState == READY) a packet is queued and then immediately dequeued (comments explain that this is done in order to hit all the tracing hooks) but the return value of the Dequeue function is not checked.  If the Enqueue function decides to drop the packet the program exits with code -11 (while it's true that dropping a packet when it's the only one in the queue is probably not the most obvious solution, it is possible to come with cases where this could be reasonable).
Comment 1 Tom Henderson 2010-01-08 18:33:07 EST
Created attachment 714 [details]
patch to fix

Craig, please review.  Passes all tests.
Comment 2 Faker Moatamri 2010-01-27 08:55:11 EST
Craig please review and commit if ok.
Comment 3 Craig Dowell 2010-02-05 13:11:07 EST
changeset bd6c06ad0f41