Permalink
Browse files

[PROV-1192] Windows VMs not bringing up second nic properly

  • Loading branch information...
1 parent 602f73b commit e285c8ec7c32dff15ef7ef2a436bc9c509436ae7 @rgulewich rgulewich committed Sep 12, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −5 net/vnic-dhcp.c
View
12 net/vnic-dhcp.c
@@ -435,11 +435,13 @@ populate_dhcp_reply(const struct bootp_t *bp, struct bootp_t *rbp,
}
// dns server list
- *q++ = RFC1533_DNS;
- *q++ = 4 * vdsp->vnds_num_dns_addrs;
- for (i = 0; i < vdsp->vnds_num_dns_addrs; i++) {
- memcpy(q, &vdsp->vnds_dns_addrs[i], sizeof(struct in_addr));
- q += 4;
+ if (vdsp->vnds_num_dns_addrs > 0) {
+ *q++ = RFC1533_DNS;
+ *q++ = 4 * vdsp->vnds_num_dns_addrs;
+ for (i = 0; i < vdsp->vnds_num_dns_addrs; i++) {
+ memcpy(q, &vdsp->vnds_dns_addrs[i], sizeof(struct in_addr));
+ q += 4;
+ }
}
// lease time

0 comments on commit e285c8e

Please sign in to comment.