Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist Sync



details:   https://anonhg.NetBSD.org/src/rev/6dda01c33635
branches:  trunk
changeset: 332549:6dda01c33635
user:      roy <roy%NetBSD.org@localhost>
date:      Sat Sep 27 11:00:07 2014 +0000

description:
Sync

diffstat:

 external/bsd/dhcpcd/dist/dhcpcd.c |  12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diffs (34 lines):

diff -r 6c4617c33017 -r 6dda01c33635 external/bsd/dhcpcd/dist/dhcpcd.c
--- a/external/bsd/dhcpcd/dist/dhcpcd.c Sat Sep 27 10:58:10 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd.c Sat Sep 27 11:00:07 2014 +0000
@@ -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 @@
        }
 
 #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 @@
                }
        } 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



Home | Main Index | Thread Index | Old Index