Commit 6391e47e42abf64d925c1120d03ba168cc8c2c50

Authored by aurel32
1 parent 42fc73a1

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
Showing 1 changed file with 2 additions and 0 deletions
slirp/bootp.c
... ... @@ -191,6 +191,8 @@ static void bootp_reply(struct bootp_t *bp)
191 191 rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */
192 192 rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */
193 193  
  194 + daddr.sin_addr.s_addr = 0xffffffffu;
  195 +
194 196 q = rbp->bp_vend;
195 197 memcpy(q, rfc1533_cookie, 4);
196 198 q += 4;
... ...