Module Name: src Committed By: roy Date: Sat Sep 27 11:00:07 UTC 2014
Modified Files: src/external/bsd/dhcpcd/dist: dhcpcd.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/dhcpcd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/dhcpcd/dist/dhcpcd.c diff -u src/external/bsd/dhcpcd/dist/dhcpcd.c:1.10 src/external/bsd/dhcpcd/dist/dhcpcd.c:1.11 --- src/external/bsd/dhcpcd/dist/dhcpcd.c:1.10 Sat Sep 27 01:17:34 2014 +++ src/external/bsd/dhcpcd/dist/dhcpcd.c Sat Sep 27 11:00:07 2014 @@ -1,5 +1,5 @@ #include <sys/cdefs.h> - __RCSID("$NetBSD: dhcpcd.c,v 1.10 2014/09/27 01:17:34 roy Exp $"); + __RCSID("$NetBSD: dhcpcd.c,v 1.11 2014/09/27 11:00:07 roy Exp $"); /* * dhcpcd - DHCP client daemon @@ -457,7 +457,7 @@ configure_interface1(struct interface *i } #ifdef INET6 - if (ifo->ia == NULL && ifo->options & DHCPCD_IPV6) { + if (ifo->ia_len == 0 && ifo->options & DHCPCD_IPV6) { ifo->ia = malloc(sizeof(*ifo->ia)); if (ifo->ia == NULL) syslog(LOG_ERR, "%s: %m", __func__); @@ -471,9 +471,11 @@ configure_interface1(struct interface *i } } else { for (i = 0; i < ifo->ia_len; i++) { - if (!ifo->ia[i].iaid_set) - memcpy(ifo->ia->iaid, ifo->iaid, - sizeof(ifo->iaid)); + if (!ifo->ia[i].iaid_set) { + memcpy(&ifo->ia[i].iaid, ifo->iaid, + sizeof(ifo->ia[i].iaid)); + ifo->ia[i].iaid_set = 1; + } } } #endif