Bug 1141

Summary: MeshWifiInterfaceMac adds the supported modes to the wrong remote station
Product: ns-3 Reporter: Giovanni Di Stasi <giovanni.distasi>
Component: meshAssignee: Kirill Andreev <andreev>
Status: RESOLVED FIXED    
Severity: major CC: giovanni.distasi, ns-bugs
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   
Attachments: FIX

Description Giovanni Di Stasi 2011-05-12 12:24:37 UTC
The following piece of code adds all the modes supported by the station which is sending to the remote station:

void
MeshWifiInterfaceMac::ForwardDown (Ptr<const Packet> const_packet, Mac48Address from, Mac48Address to){

...

if (m_stationManager->IsBrandNew (to))
    {
      // in adhoc mode, we assume that every destination
      // supports all the rates we support.
      for (uint32_t i = 0; i < m_phy->GetNModes (); i++)
        {
          m_stationManager->AddSupportedMode (to, m_phy->GetMode (i));
        }
      m_stationManager->RecordDisassociated (to);
    }

...

The to variable is the address of the mesh point device which is the final destination of the packet (not the next-hop).
Should to be replaced by hdr.GetAddr1(), which is the mac address of the next-hop interface which is going to receive the packet?

Best regards,
Giovanni
Comment 1 Kirill Andreev 2011-05-17 03:03:41 UTC
Created attachment 1139 [details]
FIX

Proposed fix, did not check regressions
Comment 2 Kirill Andreev 2011-05-17 03:19:31 UTC
Tests are passed
Comment 3 Kirill Andreev 2011-06-02 11:48:59 UTC
changeset 7299	5b13afb6474f