Skip to contentSkip to conversation

Minimal ethernet frame length is 64 bytes.

PATCH New Gleb Natapov 1 participant 1 message May 21, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Minimal ethernet frame length is 64 bytes.

---
 savevm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
savevm.c +2 -1
index 8b7909a..89af93b 100644
@@ -107,12 +107,13 @@ static int announce_self_create(uint8_t *buf,
 
     /* FIXME: should we send a different packet (arp/rarp/ping)? */
 
+    memset(buf, 0, 64);
     memset(buf, 0xff, 6);         /* h_dst */
     memcpy(buf + 6, mac_addr, 6); /* h_src */
     memcpy(buf + 12, &proto, 2);  /* h_proto */
     memcpy(buf + 14, &magic, 4);  /* magic */
 
-    return 18; /* len */
+    return 64; /* len */
 }
 
 void qemu_announce_self(void)
Signature · 1 line
1.6.2.1