Skip to contentSkip to conversation

Use broadcast address for slirp dhcp replies

PATCH Applied Avi Kivity 2 participants 2 messages Jan 20, 2009 – Jan 24, 2009

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 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.

---
 slirp/bootp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
slirp/bootp.c +2 -0
index bf704ab..ca177f4 100644
@@ -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;
Signature · 1 line
1.6.0.6
#1 lore raw
Quoted 4 lines · Avi Kivity

Windows Vista drops unicast dhcp replies to its yet-unconfigured address, so use a broadcast address. This behaviour is allowed by the RFC.

Thanks, applied.

Quoted 23 lines
---
 slirp/bootp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
slirp/bootp.c +2 -0
index bf704ab..ca177f4 100644
@@ -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;
Signature · 1 line
1.6.0.6
Signature · 2 lines
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net