? dist/src/cscope.out Index: dist/src/dhcp.c =================================================================== RCS file: /cvsroot/src/external/bsd/dhcpcd/dist/src/dhcp.c,v retrieving revision 1.23.2.7 diff -u -p -r1.23.2.7 dhcp.c --- dist/src/dhcp.c 12 Apr 2020 08:29:40 -0000 1.23.2.7 +++ dist/src/dhcp.c 21 Apr 2020 09:25:46 -0000 @@ -3453,12 +3453,16 @@ dhcp_readbpf(void *arg) } break; } - if (bytes < fl) { - logerrx("%s: %s: short frame header", - __func__, ifp->name); - break; + if (fl != 0) { + if (bytes < fl) { + logerrx("%s: %s: short frame header", + __func__, ifp->name); + break; + } + bytes -= fl; + memmove(buf, buf + fl, (size_t)bytes); } - dhcp_packet(ifp, buf + fl, (size_t)(bytes - fl)); + dhcp_packet(ifp, buf, (size_t)bytes); /* Check we still have a state after processing. */ if ((state = D_STATE(ifp)) == NULL) break; @@ -3506,15 +3510,18 @@ dhcp_readudp(struct dhcpcd_ctx *ctx, str .iov_base = buf, .iov_len = sizeof(buf), }; + union { + struct cmsghdr hdr; #ifdef IP_RECVIF - unsigned char ctl[CMSG_SPACE(sizeof(struct sockaddr_dl))] = { 0 }; + uint8_t buf[CMSG_SPACE(sizeof(struct sockaddr_dl))]; #else - unsigned char ctl[CMSG_SPACE(sizeof(struct in_pktinfo))] = { 0 }; + uint8_t buf[CMSG_SPACE(sizeof(struct in_pktinfo))]; #endif + } cmsgbuf = { .buf = { 0 } }; struct msghdr msg = { .msg_name = &from, .msg_namelen = sizeof(from), .msg_iov = &iov, .msg_iovlen = 1, - .msg_control = ctl, .msg_controllen = sizeof(ctl), + .msg_control = buf, .msg_controllen = sizeof(cmsgbuf.buf), }; int s; ssize_t bytes; Index: dist/src/dhcp6.c =================================================================== RCS file: /cvsroot/src/external/bsd/dhcpcd/dist/src/dhcp6.c,v retrieving revision 1.11.2.7 diff -u -p -r1.11.2.7 dhcp6.c --- dist/src/dhcp6.c 12 Apr 2020 17:57:13 -0000 1.11.2.7 +++ dist/src/dhcp6.c 21 Apr 2020 09:25:46 -0000 @@ -3581,11 +3581,14 @@ dhcp6_recv(struct dhcpcd_ctx *ctx, struc .iov_base = buf, .iov_len = sizeof(buf), }; - unsigned char ctl[CMSG_SPACE(sizeof(struct in6_pktinfo))] = { 0 }; + union { + struct cmsghdr hdr; + uint8_t buf[CMSG_SPACE(sizeof(struct in6_pktinfo))]; + } cmsgbuf = { .buf = { 0 } }; struct msghdr msg = { .msg_name = &from, .msg_namelen = sizeof(from), .msg_iov = &iov, .msg_iovlen = 1, - .msg_control = ctl, .msg_controllen = sizeof(ctl), + .msg_control = cmsgbuf.buf, .msg_controllen = sizeof(cmsgbuf.buf), }; int s; ssize_t bytes; Index: dist/src/ipv6nd.c =================================================================== RCS file: /cvsroot/src/external/bsd/dhcpcd/dist/src/ipv6nd.c,v retrieving revision 1.10.2.6 diff -u -p -r1.10.2.6 ipv6nd.c --- dist/src/ipv6nd.c 12 Apr 2020 08:29:40 -0000 1.10.2.6 +++ dist/src/ipv6nd.c 21 Apr 2020 09:25:46 -0000 @@ -1832,11 +1832,15 @@ ipv6nd_handledata(void *arg) .iov_base = buf, .iov_len = sizeof(buf), }; - unsigned char ctl[CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int))] = { 0 }; + union { + struct cmsghdr hdr; + uint8_t buf[CMSG_SPACE(sizeof(struct in6_pktinfo)) + + CMSG_SPACE(sizeof(int))]; + } cmsgbuf = { .buf = { 0 } }; struct msghdr msg = { .msg_name = &from, .msg_namelen = sizeof(from), .msg_iov = &iov, .msg_iovlen = 1, - .msg_control = ctl, .msg_controllen = sizeof(ctl), + .msg_control = cmsgbuf.buf, .msg_controllen = sizeof(cmsgbuf.buf), }; ssize_t len;