diff --git a/src/devices/mesh/mesh-point-device.cc b/src/devices/mesh/mesh-point-device.cc index fdd5e7b7b..97ce491ac 100644 --- a/src/devices/mesh/mesh-point-device.cc +++ b/src/devices/mesh/mesh-point-device.cc @@ -167,6 +167,13 @@ MeshPointDevice::GetAddress () const return m_address; } +void +MeshPointDevice::SetAddress (Address a) +{ + NS_LOG_WARN ("Manual changing mesh point address can cause routing errors."); + m_address = Mac48Address::ConvertFrom(a); +} + bool MeshPointDevice::SetMtu (const uint16_t mtu) { diff --git a/src/devices/mesh/mesh-point-device.h b/src/devices/mesh/mesh-point-device.h index ae6292308..1f67ebfdd 100644 --- a/src/devices/mesh/mesh-point-device.h +++ b/src/devices/mesh/mesh-point-device.h @@ -96,6 +96,7 @@ public: virtual uint32_t GetIfIndex () const; virtual Ptr GetChannel () const; virtual Address GetAddress () const; + virtual void SetAddress (Address a); virtual bool SetMtu (const uint16_t mtu); virtual uint16_t GetMtu () const; virtual bool IsLinkUp () const;