Bugzilla – Bug 173
Comparing one Address to another is a PITA
Last modified: 2008-07-01 13:32:29 UTC
Because of this: bool operator == (const Address &a, const Address &b) { NS_ASSERT (a.m_type == b.m_type || a.m_type == 0 || b.m_type == 0); NS_ASSERT (a.GetLength() == b.GetLength()); return memcmp (a.m_data, b.m_data, a.m_len) == 0; } If I try to compare addresses of different types, NS-3 aborts. Why? Addresses of different types should just compare not equal, nothing more. Especially since there is no method to get the type of a generic Address...
looks good to me. Feel free to apply.
http://code.nsnam.org/ns-3-dev/rev/6244ea5e7831