dhcp packet size fix (aka pump fix)
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 4 Jun 2004 15:30:48 +0000 (15:30 +0000)
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 4 Jun 2004 15:30:48 +0000 (15:30 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@888 c046a42c-6fe2-441c-8c8c-71466251a162

slirp/bootp.c

index 755072db83cd8cf6dc2d2c3336b40402aaa0f71e..30cb05e9569e4fd8bb5727e67cf8e21eb4d95870 100644 (file)
@@ -225,7 +225,8 @@ static void bootp_reply(struct bootp_t *bp)
     }
     *q++ = RFC1533_END;
     
-    m->m_len = sizeof(struct bootp_t);
+    m->m_len = sizeof(struct bootp_t) - 
+        sizeof(struct ip) - sizeof(struct udphdr);
     udp_output2(NULL, m, &saddr, &daddr, IPTOS_LOWDELAY);
 }