bug 1396: ARP with hardware addresses longer than 6 bytes

This commit is contained in:
Mike Moreton committed 2012-05-26 06:47:56 -07:00
1 parent 610572398f
commit da5e0bd177
1 file changed
+7 -2
+7 -2
View File
@@ -121,8 +121,13 @@ ArpHeader::Print (std::ostream &os) const
uint32_t
ArpHeader::GetSerializedSize (void) const
{
/* this is the size of an ARP payload. */
return 28;
NS_ASSERT((m_macSource.GetLength () == 6) || (m_macSource.GetLength () == 8));
NS_ASSERT (m_macSource.GetLength () == m_macDest.GetLength ());
uint32_t length = 16; // Length minus two hardware addresses
length += m_macSource.GetLength () * 2;
return length;
}
void