Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit e285c8ec7c32dff15ef7ef2a436bc9c509436ae7 1 parent 602f73b
@rgulewich rgulewich authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.