Bugzilla – Bug 490
OnOffApplication: m_lastStartTime not set correctly
Last modified: 2009-03-12 16:19:15 EDT
m_lastStartTime needs to be set both when a packet is sent and when the application starts sending. Otherwise, it is possible for an application to start and stop without a packet being sent, and the computation for m_residualBits becomes incorrect. An artifact of the current bug is that csma-multicast.cc script doesn't send any packets. Also, the behavior of OnOffApplication needs to be better documented because it wasn't intuitive to me that state is saved across stop/start event sequences.
Created attachment 373 [details] suggested patch
Makes perfect sense; if its tested, please commit.
The patch breaks the regression in two tests: FAIL: 2 of 22 tests have failed (test-csma-multicast, test-csma-raw-ip-socket) Tom, can you comment on whether or not you'd expect the regression traces to change in these two cases? It seems that most of our tests use the OnOff application, but only two of them change their output.
Whoops, didn't mean to close the bug.
Somewhere along the line the csma-multicast regression test was actually disabled because an app change caused it to cease emitting packets. Tom and I had a laugh when he disabled multicast in his ipv4 rework and the multicast tests continued to pass. All of the traces for csma-raw-ip-socket are also empty now as well, probably due to the same thing. If your change causes these tests to begin emitting packets, that is "A Good Thing" (TM).
(In reply to comment #3) > The patch breaks the regression in two tests: > FAIL: 2 of 22 tests have failed (test-csma-multicast, test-csma-raw-ip-socket) > > Tom, can you comment on whether or not you'd expect the regression traces to > change in these two cases? It seems that most of our tests use the OnOff > application, but only two of them change their output. > Yes, my initial comment said that csma-multicast was broken by this bug. test-csma-raw-ip-socket also has no packets because of this bug. It seemed to me that this patch causes packets to flow correctly in those cases. Can you please commit it?
4262:170eff4aba90 in ns-3-dev 72:b58c70b348d4 is ns-3-dev-ref-traces