Bug 1691 - RTS/CTS NAV reset prematurely
RTS/CTS NAV reset prematurely
Product: ns-3
Classification: Unclassified
Component: wifi
All All
: P5 major
Assigned To: Daniel L.
Depends on:
  Show dependency treegraph
Reported: 2013-05-30 04:31 EDT by marco.porsch
Modified: 2013-10-14 10:30 EDT (History)
3 users (show)

See Also:

proposed patch (936 bytes, application/octet-stream)
2013-05-30 04:31 EDT, marco.porsch
The same patch from the latest ns-3-dev (627 bytes, patch)
2013-10-08 11:52 EDT, Daniel L.
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marco.porsch 2013-05-30 04:31:31 EDT
Created attachment 1604 [details]
proposed patch

in mac-low.cc : NotifyNav there is a timeout set, in case no CTS is received to an RTS. There is a comment stating:
"A STA [...] is permitted to reset its NAV if no PHY-RXSTART.indication is detected [some time after] the RTS frame."
Unfortunately the check at timer expiry seems to be wrong, and perfoms an NAV reset when it should not.

Also DoNavResetNow looks a bit sketchy.

Please see my attached patch.
Comment 1 Daniel L. 2013-10-08 11:52:08 EDT
Created attachment 1677 [details]
The same patch from the latest ns-3-dev

The same patch but diff from the current ns-3-dev.

I agree that the two fixes are needed.

- tested with a small network with 3 nodes. NAV was indeed reset prematurely
- the assignment to m_lastNavStart is obviously incorrect (should be m_lastNavDuration as in the patch)

All tests in "test.py -c core" pass after applying the patch.

If anyone has any comment, please let me know. Otherwise, I think the patch is ready to go.
Comment 2 Daniel L. 2013-10-08 11:56:53 EDT
Actually, the m_lastNavDuration issue was the same as Bug 1681.

Some discussion in there suggests that more work may be needed to confirm the second m_lastNavDuration issue before proceeding.
Comment 3 Daniel L. 2013-10-14 10:30:00 EDT
Fixed in 10216:48e0bcbc4281

I left the DoNavResetNow diff out for now since the same issue is already reported in Bug 1681. Bug 1681 still needs more investigation.