$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ --- ndisc6-0.9.8.orig/src/ndisc.c 2008-05-01 14:52:28.000000000 +0200 +++ ndisc6-0.9.8/src/ndisc.c 2009-05-10 19:16:53.000000000 +0200 @@ -375,12 +375,13 @@ parseroute (const uint8_t *opt) static int parserdnss (const uint8_t *opt) { + unsigned int i; uint8_t optlen = opt[1]; if (((optlen & 1) == 0) || (optlen < 3)) return -1; optlen /= 2; - for (unsigned i = 0; i < optlen; i++) + for (i = 0; i < optlen; i++) { char str[INET6_ADDRSTRLEN]; @@ -521,6 +522,7 @@ static ssize_t recvfromLL (int fd, void *buf, size_t len, int flags, struct sockaddr_in6 *addr) { + struct cmsghdr *cmsg; char cbuf[CMSG_SPACE (sizeof (int))]; struct iovec iov = { @@ -542,7 +544,7 @@ recvfromLL (int fd, void *buf, size_t le return val; /* ensures the hop limit is 255 */ - for (struct cmsghdr *cmsg = CMSG_FIRSTHDR (&hdr); + for (cmsg = CMSG_FIRSTHDR (&hdr); cmsg != NULL; cmsg = CMSG_NXTHDR (&hdr, cmsg)) {