Bug 1141 - MeshWifiInterfaceMac adds the supported modes to the wrong remote station
MeshWifiInterfaceMac adds the supported modes to the wrong remote station
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: mesh
pre-release
All All
: P5 major
Assigned To: Kirill Andreev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-12 12:24 UTC by Giovanni Di Stasi
Modified: 2011-06-02 11:48 UTC (History)
2 users (show)

See Also:


Attachments
FIX (1.03 KB, patch)
2011-05-17 03:03 UTC, Kirill Andreev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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