Commit 976305b75fde5cb6cfb47b390fc4463c0b40fc30
Committed by
Anthony Liguori
1 parent
c833ab73
Minimal ethernet frame length is 64 bytes.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing
1 changed file
with
2 additions
and
1 deletions
savevm.c
@@ -107,12 +107,13 @@ static int announce_self_create(uint8_t *buf, | @@ -107,12 +107,13 @@ static int announce_self_create(uint8_t *buf, | ||
107 | 107 | ||
108 | /* FIXME: should we send a different packet (arp/rarp/ping)? */ | 108 | /* FIXME: should we send a different packet (arp/rarp/ping)? */ |
109 | 109 | ||
110 | + memset(buf, 0, 64); | ||
110 | memset(buf, 0xff, 6); /* h_dst */ | 111 | memset(buf, 0xff, 6); /* h_dst */ |
111 | memcpy(buf + 6, mac_addr, 6); /* h_src */ | 112 | memcpy(buf + 6, mac_addr, 6); /* h_src */ |
112 | memcpy(buf + 12, &proto, 2); /* h_proto */ | 113 | memcpy(buf + 12, &proto, 2); /* h_proto */ |
113 | memcpy(buf + 14, &magic, 4); /* magic */ | 114 | memcpy(buf + 14, &magic, 4); /* magic */ |
114 | 115 | ||
115 | - return 18; /* len */ | 116 | + return 64; /* len */ |
116 | } | 117 | } |
117 | 118 | ||
118 | void qemu_announce_self(void) | 119 | void qemu_announce_self(void) |