make sure that mac addr len is correctly written

This commit is contained in:
Mathieu Lacage committed 2007-02-12 23:24:00 +01:00
1 parent ba2e65e653
commit 430d86d09c
1 file changed
+2 -1
+2 -1
View File
@@ -114,12 +114,13 @@ void
ArpHeader::SerializeTo (Buffer::Iterator start) const
{
Buffer::Iterator i = start;
assert (m_macSource.GetLength () == m_macDest.GetLength ());
/* ethernet */
i.WriteHtonU16 (0x0001);
/* ipv4 */
i.WriteHtonU16 (0x0800);
i.WriteU8 (6);
i.WriteU8 (m_macSource.GetLength ());
i.WriteU8 (4);
i.WriteHtonU16 (m_type);
WriteTo (i, m_macSource);