aboutsummaryrefslogtreecommitdiff
path: root/slirp/bootp.c
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
commit6391e47e42abf64d925c1120d03ba168cc8c2c50 (patch)
treea7f8ec8a9d435eb1cbfe8c08177b46e317fc1917 /slirp/bootp.c
parent42fc73a1ceeadb27d15873124c537be5ada4b4d3 (diff)
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
Diffstat (limited to 'slirp/bootp.c')
-rw-r--r--slirp/bootp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/slirp/bootp.c b/slirp/bootp.c
index bf704abf52..ca177f40c2 100644
--- a/slirp/bootp.c
+++ b/slirp/bootp.c
@@ -191,6 +191,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;