1 diff -uN tcp_wrappers_7.6/hosts_access.c tcp_wrappers_7.6.new/hosts_access.c
2 --- tcp_wrappers_7.6/hosts_access.c Mon May 20 14:00:56 2002
3 +++ tcp_wrappers_7.6.new/hosts_access.c Mon May 20 14:25:05 2002
5 int len, mask_len, i = 0;
9 + * Behavior of getaddrinfo() against IPv4-mapped IPv6 address is
10 + * different between KAME and Solaris8. While KAME returns
11 + * AF_INET6, Solaris8 returns AF_INET. So, we avoid this here.
13 + if (STRN_EQ(string, "::ffff:", 7)
14 + && dot_quad_addr(string + 7) != INADDR_NONE)
15 + return (masked_match4(net_tok, mask_tok, string + 7));
17 memset(&hints, 0, sizeof(hints));
18 hints.ai_family = AF_INET6;
19 hints.ai_socktype = SOCK_STREAM;
21 memcpy(&addr, res->ai_addr, sizeof(addr));
24 - if (IN6_IS_ADDR_V4MAPPED(&addr.sin6_addr)) {
25 - if ((*(u_int32_t *)&net.sin6_addr.s6_addr[12] = dot_quad_addr(net_tok)) == INADDR_NONE
26 - || (mask = dot_quad_addr(mask_tok)) == INADDR_NONE)
28 - return ((*(u_int32_t *)&addr.sin6_addr.s6_addr[12] & mask) == *(u_int32_t *)&net.sin6_addr.s6_addr[12]);
31 /* match IPv6 address against netnumber/prefixlen */
32 len = strlen(net_tok);
33 if (*net_tok != '[' || net_tok[len - 1] != ']')
34 diff -uN tcp_wrappers_7.6/socket.c tcp_wrappers_7.6.new/socket.c
35 --- tcp_wrappers_7.6/socket.c Mon May 20 13:48:35 2002
36 +++ tcp_wrappers_7.6.new/socket.c Mon May 20 14:22:27 2002
38 hints.ai_family = sin->sa_family;
39 hints.ai_socktype = SOCK_STREAM;
40 hints.ai_flags = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST;
41 - if ((err = getaddrinfo(host->name, NULL, &hints, &res0) == 0)) {
42 + if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
45 tcpd_warn("host name/name mismatch: "