OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../tcp_wrappers/0008-tcp_wrappers-7.6-usagi-fix.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
  17. --- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002
  18. +++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002
  19. @@ -448,6 +448,15 @@
  20. int len, mask_len, i = 0;
  21. char ch;
  22. + /*
  23. + * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
  24. + * different between KAME and Solaris8. While KAME returns
  25. + * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here.
  26. + */
  27. + if (STRN_EQ(string, "::ffff:", 7)
  28. + && dot_quad_addr(string + 7) != INADDR_NONE)
  29. + return (masked_match4(net_tok, mask_tok, string + 7));
  30. +
  31. memset(&hints, 0, sizeof(hints));
  32. hints.ai_family = AF_INET6;
  33. hints.ai_socktype = SOCK_STREAM;
  34. @@ -457,13 +466,6 @@
  35. memcpy(&addr, res->ai_addr, sizeof(addr));
  36. freeaddrinfo(res);
  37. - if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
  38. - if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
  39. - || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
  40. - return (NO);
  41. - return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
  42. - }
  43. -
  44. /* match IPv6 address against netnumber/prefixlen */
  45. len = strlen(net_tok);
  46. if (*net_tok != '[' || net_tok[len - 1] != ']')
  47. diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
  48. --- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002
  49. +++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002
  50. @@ -228,7 +228,7 @@
  51. hints.ai_family = sin->sa_family;
  52. hints.ai_socktype = SOCK_STREAM;
  53. hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
  54. - if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
  55. + if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
  56. freeaddrinfo(res0);
  57. res0 = NULL;
  58. tcpd_warn("host name/name mismatch: "