qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Use broadcast address for slirp dhcp replies


From: Avi Kivity
Subject: [Qemu-devel] [PATCH] Use broadcast address for slirp dhcp replies
Date: Tue, 20 Jan 2009 16:33:31 +0200

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 <address@hidden>
---
 slirp/bootp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/slirp/bootp.c b/slirp/bootp.c
index bf704ab..ca177f4 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;
-- 
1.6.0.6





reply via email to

[Prev in Thread] Current Thread [Next in Thread]