Bug 2089

Summary: No actual check about SS state machine in SubscriberStationNetDevice::DoReceive
Product: ns-3 Reporter: zzxx <zhaoyj163em>
Component: wimaxAssignee: ns-bugs <ns-bugs>
Status: NEW ---    
Severity: normal CC: muni_es
Priority: P5 Keywords: bug
Version: ns-3.22   
Hardware: PC   
OS: Windows   
Attachments: Perform actual check about SS state machine

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