Sat Jun 2 09:44:27 2018 UTC ()
Sync


(roy)
diff -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/src/bpf.c
diff -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-options.c
diff -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/dhcpcd.c

cvs diff -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/src/bpf.c (expand / switch to unified diff)

--- src/external/bsd/dhcpcd/dist/src/bpf.c 2018/01/01 11:50:56 1.6
+++ src/external/bsd/dhcpcd/dist/src/bpf.c 2018/06/02 09:44:27 1.7
@@ -98,27 +98,27 @@ bpf_frame_header_len(const struct interf @@ -98,27 +98,27 @@ bpf_frame_header_len(const struct interf
98 98
99const char *bpf_name = "Berkley Packet Filter"; 99const char *bpf_name = "Berkley Packet Filter";
100 100
101int 101int
102bpf_open(struct interface *ifp, int (*filter)(struct interface *, int)) 102bpf_open(struct interface *ifp, int (*filter)(struct interface *, int))
103{ 103{
104 struct ipv4_state *state; 104 struct ipv4_state *state;
105 int fd = -1; 105 int fd = -1;
106 struct ifreq ifr; 106 struct ifreq ifr;
107 int ibuf_len = 0; 107 int ibuf_len = 0;
108 size_t buf_len; 108 size_t buf_len;
109 struct bpf_version pv; 109 struct bpf_version pv;
110#ifdef BIOCIMMEDIATE 110#ifdef BIOCIMMEDIATE
111 int flags; 111 unsigned int flags;
112#endif 112#endif
113#ifndef O_CLOEXEC 113#ifndef O_CLOEXEC
114 int fd_opts; 114 int fd_opts;
115#endif 115#endif
116 116
117#ifdef _PATH_BPF 117#ifdef _PATH_BPF
118 fd = open(_PATH_BPF, O_RDWR | O_NONBLOCK 118 fd = open(_PATH_BPF, O_RDWR | O_NONBLOCK
119#ifdef O_CLOEXEC 119#ifdef O_CLOEXEC
120 | O_CLOEXEC 120 | O_CLOEXEC
121#endif 121#endif
122 ); 122 );
123#else 123#else
124 char device[32]; 124 char device[32];
@@ -401,27 +401,27 @@ static const struct bpf_insn bpf_arp_eth @@ -401,27 +401,27 @@ static const struct bpf_insn bpf_arp_eth
401 BPF_STMT(BPF_RET + BPF_K, 0), 401 BPF_STMT(BPF_RET + BPF_K, 0),
402 402
403 /* Load frame header length into X */ 403 /* Load frame header length into X */
404 BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)), 404 BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)),
405 405
406 /* Make sure the hardware family matches. */ 406 /* Make sure the hardware family matches. */
407 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_hrd)), 407 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_hrd)),
408 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0), 408 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPHRD_ETHER, 1, 0),
409 BPF_STMT(BPF_RET + BPF_K, 0), 409 BPF_STMT(BPF_RET + BPF_K, 0),
410 410
411 /* Make sure the hardware length matches. */ 411 /* Make sure the hardware length matches. */
412 BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct arphdr, ar_hln)), 412 BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct arphdr, ar_hln)),
413 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 413 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K,
414 sizeof((struct ether_arp *)0)->arp_sha, 1, 0), 414 sizeof(((struct ether_arp *)0)->arp_sha), 1, 0),
415 BPF_STMT(BPF_RET + BPF_K, 0), 415 BPF_STMT(BPF_RET + BPF_K, 0),
416}; 416};
417#define bpf_arp_ether_len __arraycount(bpf_arp_ether) 417#define bpf_arp_ether_len __arraycount(bpf_arp_ether)
418 418
419static const struct bpf_insn bpf_arp_filter [] = { 419static const struct bpf_insn bpf_arp_filter [] = {
420 /* Make sure this is for IP. */ 420 /* Make sure this is for IP. */
421 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_pro)), 421 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_pro)),
422 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0), 422 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0),
423 BPF_STMT(BPF_RET + BPF_K, 0), 423 BPF_STMT(BPF_RET + BPF_K, 0),
424 /* Make sure this is an ARP REQUEST. */ 424 /* Make sure this is an ARP REQUEST. */
425 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_op)), 425 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct arphdr, ar_op)),
426 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 2, 0), 426 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REQUEST, 2, 0),
427 /* or ARP REPLY. */ 427 /* or ARP REPLY. */
@@ -530,27 +530,27 @@ static const struct bpf_insn bpf_bootp_e @@ -530,27 +530,27 @@ static const struct bpf_insn bpf_bootp_e
530 BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 530 BPF_STMT(BPF_LD + BPF_H + BPF_ABS,
531 offsetof(struct ether_header, ether_type)), 531 offsetof(struct ether_header, ether_type)),
532 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0), 532 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 1, 0),
533 BPF_STMT(BPF_RET + BPF_K, 0), 533 BPF_STMT(BPF_RET + BPF_K, 0),
534 534
535 /* Load frame header length into X. */ 535 /* Load frame header length into X. */
536 BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)), 536 BPF_STMT(BPF_LDX + BPF_W + BPF_IMM, sizeof(struct ether_header)),
537 /* Copy to M0. */ 537 /* Copy to M0. */
538 BPF_STMT(BPF_STX, 0), 538 BPF_STMT(BPF_STX, 0),
539}; 539};
540#define BPF_BOOTP_ETHER_LEN __arraycount(bpf_bootp_ether) 540#define BPF_BOOTP_ETHER_LEN __arraycount(bpf_bootp_ether)
541 541
542static const struct bpf_insn bpf_bootp_filter[] = { 542static const struct bpf_insn bpf_bootp_filter[] = {
543 /* Make sure it's an IPv4 packet. */ 543 /* Make sure it's an optionless IPv4 packet. */
544 BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0), 544 BPF_STMT(BPF_LD + BPF_B + BPF_IND, 0),
545 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x45, 1, 0), 545 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0x45, 1, 0),
546 BPF_STMT(BPF_RET + BPF_K, 0), 546 BPF_STMT(BPF_RET + BPF_K, 0),
547 547
548 /* Make sure it's a UDP packet. */ 548 /* Make sure it's a UDP packet. */
549 BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct ip, ip_p)), 549 BPF_STMT(BPF_LD + BPF_B + BPF_IND, offsetof(struct ip, ip_p)),
550 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0), 550 BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, IPPROTO_UDP, 1, 0),
551 BPF_STMT(BPF_RET + BPF_K, 0), 551 BPF_STMT(BPF_RET + BPF_K, 0),
552 552
553 /* Make sure this isn't a fragment. */ 553 /* Make sure this isn't a fragment. */
554 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_off)), 554 BPF_STMT(BPF_LD + BPF_H + BPF_IND, offsetof(struct ip, ip_off)),
555 BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 0, 1), 555 BPF_JUMP(BPF_JMP + BPF_JSET + BPF_K, 0x1fff, 0, 1),
556 BPF_STMT(BPF_RET + BPF_K, 0), 556 BPF_STMT(BPF_RET + BPF_K, 0),

cvs diff -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/dhcp.c (expand / switch to unified diff)

--- src/external/bsd/dhcpcd/dist/src/dhcp.c 2018/03/27 06:16:34 1.9
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c 2018/06/02 09:44:27 1.10
@@ -3266,41 +3266,47 @@ get_udp_data(void *udp, size_t *len) @@ -3266,41 +3266,47 @@ get_udp_data(void *udp, size_t *len)
3266 3266
3267 p = (struct bootp_pkt *)udp; 3267 p = (struct bootp_pkt *)udp;
3268 *len = ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp); 3268 *len = ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp);
3269 return (char *)udp + offsetof(struct bootp_pkt, bootp); 3269 return (char *)udp + offsetof(struct bootp_pkt, bootp);
3270} 3270}
3271 3271
3272static int 3272static int
3273valid_udp_packet(void *data, size_t data_len, struct in_addr *from, 3273valid_udp_packet(void *data, size_t data_len, struct in_addr *from,
3274 int noudpcsum) 3274 int noudpcsum)
3275{ 3275{
3276 struct bootp_pkt *p; 3276 struct bootp_pkt *p;
3277 uint16_t bytes; 3277 uint16_t bytes;
3278 3278
3279 if (data_len < sizeof(p->ip) + sizeof(p->udp)) { 3279 if (data_len < sizeof(p->ip)) {
3280 if (from) 3280 if (from)
3281 from->s_addr = INADDR_ANY; 3281 from->s_addr = INADDR_ANY;
3282 errno = ERANGE; 3282 errno = ERANGE;
3283 return -1; 3283 return -1;
3284 } 3284 }
3285 p = (struct bootp_pkt *)data; 3285 p = (struct bootp_pkt *)data;
3286 if (from) 3286 if (from)
3287 from->s_addr = p->ip.ip_src.s_addr; 3287 from->s_addr = p->ip.ip_src.s_addr;
3288 if (checksum(&p->ip, sizeof(p->ip)) != 0) { 3288 if (checksum(&p->ip, sizeof(p->ip)) != 0) {
3289 errno = EINVAL; 3289 errno = EINVAL;
3290 return -1; 3290 return -1;
3291 } 3291 }
3292 3292
3293 bytes = ntohs(p->ip.ip_len); 3293 bytes = ntohs(p->ip.ip_len);
 3294 /* Check we have a payload */
 3295 if (bytes <= sizeof(p->ip) + sizeof(p->udp)) {
 3296 errno = ERANGE;
 3297 return -1;
 3298 }
 3299 /* Check we don't go beyond the payload */
3294 if (bytes > data_len) { 3300 if (bytes > data_len) {
3295 errno = ENOBUFS; 3301 errno = ENOBUFS;
3296 return -1; 3302 return -1;
3297 } 3303 }
3298 3304
3299 if (noudpcsum == 0) { 3305 if (noudpcsum == 0) {
3300 uint16_t udpsum, iplen; 3306 uint16_t udpsum, iplen;
3301 3307
3302 /* This does scribble on the packet, but at this point 3308 /* This does scribble on the packet, but at this point
3303 * we don't care to keep it. */ 3309 * we don't care to keep it. */
3304 iplen = p->ip.ip_len; 3310 iplen = p->ip.ip_len;
3305 udpsum = p->udp.uh_sum; 3311 udpsum = p->udp.uh_sum;
3306 p->udp.uh_sum = 0; 3312 p->udp.uh_sum = 0;
@@ -3324,27 +3330,27 @@ valid_udp_packet(void *data, size_t data @@ -3324,27 +3330,27 @@ valid_udp_packet(void *data, size_t data
3324 3330
3325static void 3331static void
3326dhcp_handlepacket(struct interface *ifp, uint8_t *data, size_t len) 3332dhcp_handlepacket(struct interface *ifp, uint8_t *data, size_t len)
3327{ 3333{
3328 struct bootp *bootp; 3334 struct bootp *bootp;
3329 struct in_addr from; 3335 struct in_addr from;
3330 size_t udp_len; 3336 size_t udp_len;
3331 const struct dhcp_state *state = D_CSTATE(ifp); 3337 const struct dhcp_state *state = D_CSTATE(ifp);
3332 3338
3333 if (valid_udp_packet(data, len, &from, 3339 if (valid_udp_packet(data, len, &from,
3334 state->bpf_flags & RAW_PARTIALCSUM) == -1) 3340 state->bpf_flags & RAW_PARTIALCSUM) == -1)
3335 { 3341 {
3336 if (errno == EINVAL) 3342 if (errno == EINVAL)
3337 logerrx("%s: UDP checksum failure from %s", 3343 logerrx("%s: checksum failure from %s",
3338 ifp->name, inet_ntoa(from)); 3344 ifp->name, inet_ntoa(from));
3339 else 3345 else
3340 logerr("%s: invalid UDP packet from %s", 3346 logerr("%s: invalid UDP packet from %s",
3341 ifp->name, inet_ntoa(from)); 3347 ifp->name, inet_ntoa(from));
3342 return; 3348 return;
3343 } 3349 }
3344 if (ifp->flags & IFF_POINTOPOINT && 3350 if (ifp->flags & IFF_POINTOPOINT &&
3345 (state->addr == NULL || state->addr->brd.s_addr != from.s_addr)) 3351 (state->addr == NULL || state->addr->brd.s_addr != from.s_addr))
3346 { 3352 {
3347 logwarnx("%s: server %s is not destination", 3353 logwarnx("%s: server %s is not destination",
3348 ifp->name, inet_ntoa(from)); 3354 ifp->name, inet_ntoa(from));
3349 } 3355 }
3350 3356

cvs diff -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/src/if-options.c (expand / switch to unified diff)

--- src/external/bsd/dhcpcd/dist/src/if-options.c 2018/05/02 22:08:45 1.9
+++ src/external/bsd/dhcpcd/dist/src/if-options.c 2018/06/02 09:44:27 1.10
@@ -1350,39 +1350,36 @@ parse_option(struct dhcpcd_ctx *ctx, con @@ -1350,39 +1350,36 @@ parse_option(struct dhcpcd_ctx *ctx, con
1350 if (arg) { 1350 if (arg) {
1351 p = strchr(arg, '/'); 1351 p = strchr(arg, '/');
1352 if (p) 1352 if (p)
1353 *p++ = '\0'; 1353 *p++ = '\0';
1354 if (parse_iaid(iaid, arg, sizeof(iaid)) == -1) { 1354 if (parse_iaid(iaid, arg, sizeof(iaid)) == -1) {
1355 logerr("invalid IAID: %s", arg); 1355 logerr("invalid IAID: %s", arg);
1356 return -1; 1356 return -1;
1357 } 1357 }
1358 } 1358 }
1359 ia = NULL; 1359 ia = NULL;
1360 for (sl = 0; sl < ifo->ia_len; sl++) { 1360 for (sl = 0; sl < ifo->ia_len; sl++) {
1361 if ((arg == NULL && !ifo->ia[sl].iaid_set) || 1361 if ((arg == NULL && !ifo->ia[sl].iaid_set) ||
1362 (arg != NULL && ifo->ia[sl].iaid_set && 1362 (arg != NULL && ifo->ia[sl].iaid_set &&
 1363 ifo->ia[sl].ia_type == (uint16_t)i &&
1363 ifo->ia[sl].iaid[0] == iaid[0] && 1364 ifo->ia[sl].iaid[0] == iaid[0] &&
1364 ifo->ia[sl].iaid[1] == iaid[1] && 1365 ifo->ia[sl].iaid[1] == iaid[1] &&
1365 ifo->ia[sl].iaid[2] == iaid[2] && 1366 ifo->ia[sl].iaid[2] == iaid[2] &&
1366 ifo->ia[sl].iaid[3] == iaid[3])) 1367 ifo->ia[sl].iaid[3] == iaid[3]))
1367 { 1368 {
1368 ia = &ifo->ia[sl]; 1369 ia = &ifo->ia[sl];
1369 break; 1370 break;
1370 } 1371 }
1371 } 1372 }
1372 if (ia && ia->ia_type != (uint16_t)i) { 
1373 logerrx("Cannot mix IA for the same IAID"); 
1374 break; 
1375 } 
1376 if (ia == NULL) { 1373 if (ia == NULL) {
1377 ia = reallocarray(ifo->ia, 1374 ia = reallocarray(ifo->ia,
1378 ifo->ia_len + 1, sizeof(*ifo->ia)); 1375 ifo->ia_len + 1, sizeof(*ifo->ia));
1379 if (ia == NULL) { 1376 if (ia == NULL) {
1380 logerr(__func__); 1377 logerr(__func__);
1381 return -1; 1378 return -1;
1382 } 1379 }
1383 ifo->ia = ia; 1380 ifo->ia = ia;
1384 ia = &ifo->ia[ifo->ia_len++]; 1381 ia = &ifo->ia[ifo->ia_len++];
1385 ia->ia_type = (uint16_t)i; 1382 ia->ia_type = (uint16_t)i;
1386 if (arg) { 1383 if (arg) {
1387 ia->iaid[0] = iaid[0]; 1384 ia->iaid[0] = iaid[0];
1388 ia->iaid[1] = iaid[1]; 1385 ia->iaid[1] = iaid[1];

cvs diff -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/src/dhcpcd.c (expand / switch to unified diff)

--- src/external/bsd/dhcpcd/dist/src/dhcpcd.c 2018/04/06 10:47:47 1.10
+++ src/external/bsd/dhcpcd/dist/src/dhcpcd.c 2018/06/02 09:44:27 1.11
@@ -760,40 +760,43 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx * @@ -760,40 +760,43 @@ dhcpcd_handlecarrier(struct dhcpcd_ctx *
760 /* Set any IPv6 Routers we remembered to expire 760 /* Set any IPv6 Routers we remembered to expire
761 * faster than they would normally as we 761 * faster than they would normally as we
762 * maybe on a new network. */ 762 * maybe on a new network. */
763 ipv6nd_expire(ifp, RTR_CARRIER_EXPIRE); 763 ipv6nd_expire(ifp, RTR_CARRIER_EXPIRE);
764#endif 764#endif
765 /* RFC4941 Section 3.5 */ 765 /* RFC4941 Section 3.5 */
766 ipv6_gentempifid(ifp); 766 ipv6_gentempifid(ifp);
767 dhcpcd_startinterface(ifp); 767 dhcpcd_startinterface(ifp);
768 } 768 }
769 } 769 }
770} 770}
771 771
772static void 772static void
773warn_iaid_conflict(struct interface *ifp, uint8_t *iaid) 773warn_iaid_conflict(struct interface *ifp, uint16_t ia_type, uint8_t *iaid)
774{ 774{
775 struct interface *ifn; 775 struct interface *ifn;
776 size_t i; 776 size_t i;
 777 struct if_ia *ia;
777 778
778 TAILQ_FOREACH(ifn, ifp->ctx->ifaces, next) { 779 TAILQ_FOREACH(ifn, ifp->ctx->ifaces, next) {
779 if (ifn == ifp || !ifn->active) 780 if (ifn == ifp || !ifn->active)
780 continue; 781 continue;
781 if (memcmp(ifn->options->iaid, iaid, 782 if (ia_type == 0 &&
 783 memcmp(ifn->options->iaid, iaid,
782 sizeof(ifn->options->iaid)) == 0) 784 sizeof(ifn->options->iaid)) == 0)
783 break; 785 break;
784 for (i = 0; i < ifn->options->ia_len; i++) { 786 for (i = 0; i < ifn->options->ia_len; i++) {
785 if (memcmp(&ifn->options->ia[i].iaid, iaid, 787 ia = &ifn->options->ia[i];
786 sizeof(ifn->options->ia[i].iaid)) == 0) 788 if (ia->ia_type == ia_type &&
 789 memcmp(ia->iaid, iaid, sizeof(ia->iaid)) == 0)
787 break; 790 break;
788 } 791 }
789 } 792 }
790 793
791 /* This is only a problem if the interfaces are on the same network. */ 794 /* This is only a problem if the interfaces are on the same network. */
792 if (ifn) 795 if (ifn)
793 logerrx("%s: IAID conflicts with one assigned to %s", 796 logerrx("%s: IAID conflicts with one assigned to %s",
794 ifp->name, ifn->name); 797 ifp->name, ifn->name);
795} 798}
796 799
797void 800void
798dhcpcd_startinterface(void *arg) 801dhcpcd_startinterface(void *arg)
799{ 802{
@@ -829,40 +832,41 @@ dhcpcd_startinterface(void *arg) @@ -829,40 +832,41 @@ dhcpcd_startinterface(void *arg)
829 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) { 832 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) {
830 /* Report client DUID */ 833 /* Report client DUID */
831 if (ifp->ctx->duid == NULL) { 834 if (ifp->ctx->duid == NULL) {
832 if (duid_init(ifp) == 0) 835 if (duid_init(ifp) == 0)
833 return; 836 return;
834 loginfox("DUID %s", 837 loginfox("DUID %s",
835 hwaddr_ntoa(ifp->ctx->duid, 838 hwaddr_ntoa(ifp->ctx->duid,
836 ifp->ctx->duid_len, 839 ifp->ctx->duid_len,
837 buf, sizeof(buf))); 840 buf, sizeof(buf)));
838 } 841 }
839 } 842 }
840 843
841 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) { 844 if (ifo->options & (DHCPCD_DUID | DHCPCD_IPV6)) {
 845 struct if_ia *ia;
 846
842 /* Report IAIDs */ 847 /* Report IAIDs */
843 loginfox("%s: IAID %s", ifp->name, 848 loginfox("%s: IAID %s", ifp->name,
844 hwaddr_ntoa(ifo->iaid, sizeof(ifo->iaid), 849 hwaddr_ntoa(ifo->iaid, sizeof(ifo->iaid),
845 buf, sizeof(buf))); 850 buf, sizeof(buf)));
846 warn_iaid_conflict(ifp, ifo->iaid); 851 warn_iaid_conflict(ifp, 0, ifo->iaid);
847 for (i = 0; i < ifo->ia_len; i++) { 852 for (i = 0; i < ifo->ia_len; i++) {
848 if (memcmp(ifo->iaid, ifo->ia[i].iaid, 853 ia = &ifo->ia[i];
849 sizeof(ifo->iaid))) 854 if (memcmp(ifo->iaid, ia->iaid, sizeof(ifo->iaid))) {
850 { 855 loginfox("%s: IA type %u IAID %s",
851 loginfox("%s: IAID %s", 856 ifp->name, ia->ia_type,
852 ifp->name, hwaddr_ntoa(ifo->ia[i].iaid, 857 hwaddr_ntoa(ia->iaid, sizeof(ia->iaid),
853 sizeof(ifo->ia[i].iaid), 
854 buf, sizeof(buf))); 858 buf, sizeof(buf)));
855 warn_iaid_conflict(ifp, ifo->ia[i].iaid); 859 warn_iaid_conflict(ifp, ia->ia_type, ia->iaid);
856 } 860 }
857 } 861 }
858 } 862 }
859 863
860 if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) { 864 if (ifo->options & DHCPCD_IPV6 && ipv6_start(ifp) == -1) {
861 logerr("%s: ipv6_start", ifp->name); 865 logerr("%s: ipv6_start", ifp->name);
862 ifo->options &= ~DHCPCD_IPV6; 866 ifo->options &= ~DHCPCD_IPV6;
863 } 867 }
864 if (ifo->options & DHCPCD_IPV6) { 868 if (ifo->options & DHCPCD_IPV6) {
865 if (ifp->active == IF_ACTIVE_USER) { 869 if (ifp->active == IF_ACTIVE_USER) {
866 ipv6_startstatic(ifp); 870 ipv6_startstatic(ifp);
867 871
868 if (ifo->options & DHCPCD_IPV6RS) 872 if (ifo->options & DHCPCD_IPV6RS)