1
0

patch-src_ndisc_c 1004 B

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