From 5e2d3e7604a9f5772fd28efa7d3b6ffec07aeb22 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Mon, 11 Mar 2013 23:06:41 +0100 Subject: [PATCH] Bug 1568 - Deserialized Addresses are implicitly marked as Mac48Address --- src/network/model/address.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/model/address.cc b/src/network/model/address.cc index 716cb29d9..468dbc6c0 100644 --- a/src/network/model/address.cc +++ b/src/network/model/address.cc @@ -123,7 +123,8 @@ Address::CheckCompatible (uint8_t type, uint8_t len) const { NS_LOG_FUNCTION (this << static_cast (type) << static_cast (len)); NS_ASSERT (len <= MAX_SIZE); - return m_len == len && (m_type == type || m_type == 0); + // Mac address type/length detection is discussed in bug 1568 + return (m_len == len && m_type == type) || (m_len >= len && m_type == 0); } bool Address::IsMatchingType (uint8_t type) const