Bug 2089 - No actual check about SS state machine in SubscriberStationNetDevice::DoReceive
No actual check about SS state machine in SubscriberStationNetDevice::DoReceive
Status: NEW
Product: ns-3
Classification: Unclassified
Component: wimax
ns-3.22
PC Windows
: P5 normal
Assigned To: ns-bugs
: bug
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-06 02:19 EDT by zzxx
Modified: 2015-04-20 11:45 EDT (History)
1 user (show)

See Also:


Attachments
Perform actual check about SS state machine (1.43 KB, patch)
2015-04-20 11:45 EDT, Esteban
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zzxx 2015-04-06 02:19:24 EDT
This mistake surprises me a lot.

In SubscriberStationNetDevice::DoReceive, you could find the following statement:

NS_ASSERT_MSG (SS_STATE_WAITING_RNG_RSP, 
  "SS: Error while receiving a ranging response message: SS state should be SS_STATE_WAITING_RNG_RSP");

If you're using ns-3.22, you can find it in line 920-921 and line 939-940 in ss-net-deivce.cc. It is obvious that the condition part of this assert is wrong, which makes this check always skipped. It should be corrected in this way:

NS_ASSERT_MSG (GetState() == SS_STATE_WAITING_RNG_RSP, 
  "SS: Error while receiving a ranging response message: SS state should be SS_STATE_WAITING_RNG_RSP");

However when the statement is corrected, programs in /wimax/examples, like wimax-ipv4.cc, will definitely throw this assert. There should be some problems in SS state machine elsewhere.

Thanks Mr Tommaso Pecorella for supporting me opening this bug here.
And here is where i posted this bug at the beginning. https://groups.google.com/forum/?hl=zh-TW#!topic/ns-3-users/8ZA7UZOpEG0

Hope this would help.
Comment 1 Esteban 2015-04-20 11:43:33 EDT
I attach changes you have purposed in the following patch: 

ofdm-fix-default-traces.patch
Comment 2 Esteban 2015-04-20 11:45:13 EDT
Created attachment 2025 [details]
Perform actual check about SS state machine

Perform actual check about SS state machine. Can be applied from the ns-3.22 home directory with patch -p2