aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-24 18:16:18 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-24 18:16:18 +0000
commiteb4a7cc26d2ef8e00226fff7445b777371eb1734 (patch)
treeeb67a265ca8daaecce1df3cfe7b195af0261d01f
parentf90b868e2cdc6edfb9ee7834bfc3c8c4ff0834b8 (diff)
downloadslirp-eb4a7cc26d2ef8e00226fff7445b777371eb1734.zip
slirp-eb4a7cc26d2ef8e00226fff7445b777371eb1734.tar.gz
slirp-eb4a7cc26d2ef8e00226fff7445b777371eb1734.tar.bz2
Use broadcast address for slirp dhcp replies
Windows Vista drops unicast dhcp replies to its yet-unconfigured address, so use a broadcast address. This behaviour is allowed by the RFC. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6430 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--bootp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bootp.c b/bootp.c
index 5bf59d7..dd54612 100644
--- a/bootp.c
+++ b/bootp.c
@@ -192,6 +192,8 @@ static void bootp_reply(struct bootp_t *bp)
rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */
rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */
+ daddr.sin_addr.s_addr = 0xffffffffu;
+
q = rbp->bp_vend;
memcpy(q, rfc1533_cookie, 4);
q += 4;