src/node/arp-header.cc
changeset 258 df3bca25ae37
parent 242 a44932709b47
child 286 57e6a2006962
--- a/src/node/arp-header.cc	Mon Feb 12 23:23:30 2007 +0100
+++ b/src/node/arp-header.cc	Mon Feb 12 23:24:00 2007 +0100
@@ -114,12 +114,13 @@
 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);