]>
Commit | Line | Data |
---|---|---|
e624f4c5 | 1 | diff -ur bind-9.2.4.orig/bin/named/client.c bind-9.2.4/bin/named/client.c |
2 | --- bind-9.2.4.orig/bin/named/client.c Fri Jul 23 04:56:59 2004 | |
3 | +++ bind-9.2.4/bin/named/client.c Sat Dec 18 19:56:38 2004 | |
4 | @@ -1299,35 +1299,15 @@ | |
5 | } | |
6 | ||
7 | /* | |
8 | - * Determine the destination address. For TCP/IPv6, we get this from | |
9 | - * the receiving socket. For UDP/IPv6, we get it from the pktinfo | |
10 | - * structure (if supported). For IPv4, we have to do with | |
11 | + * Determine the destination address. For IPv6, we get this from the | |
12 | + * pktinfo structure (if supported). For IPv4, we have to make do with | |
13 | * the address of the interface where the request was received. | |
14 | */ | |
15 | if (client->interface->addr.type.sa.sa_family == AF_INET6) { | |
16 | - result = ISC_R_FAILURE; | |
17 | - | |
18 | - if (TCP_CLIENT(client)) { | |
19 | - isc_sockaddr_t destsockaddr; | |
20 | - | |
21 | - result = isc_socket_getsockname(client->tcpsocket, | |
22 | - &destsockaddr); | |
23 | - if (result == ISC_R_SUCCESS) | |
24 | - isc_netaddr_fromsockaddr(&destaddr, | |
25 | - &destsockaddr); | |
26 | - } | |
27 | - if (result != ISC_R_SUCCESS && | |
28 | - (client->attributes & NS_CLIENTATTR_PKTINFO) != 0) { | |
29 | + if ((client->attributes & NS_CLIENTATTR_PKTINFO) != 0) | |
30 | isc_netaddr_fromin6(&destaddr, &client->pktinfo.ipi6_addr); | |
31 | - result = ISC_R_SUCCESS; | |
32 | - } | |
33 | - if (result != ISC_R_SUCCESS) { | |
34 | - UNEXPECTED_ERROR(__FILE__, __LINE__, | |
35 | - "failed to get request's " | |
36 | - "destination: %s", | |
37 | - isc_result_totext(result)); | |
38 | - goto cleanup; | |
39 | - } | |
40 | + else | |
41 | + isc_netaddr_any6(&destaddr); | |
42 | } else { | |
43 | isc_netaddr_fromsockaddr(&destaddr, &client->interface->addr); | |
44 | } |