Lines 35-40
Link Here
|
35 |
#include <netdb.h> |
35 |
#include <netdb.h> |
36 |
#include <arpa/inet.h> |
36 |
#include <arpa/inet.h> |
37 |
|
37 |
|
|
|
38 |
#include "nfslib.h" |
38 |
#include "sockaddr.h" |
39 |
#include "sockaddr.h" |
39 |
#include "statd.h" |
40 |
#include "statd.h" |
40 |
#include "xlog.h" |
41 |
#include "xlog.h" |
Lines 203-209
statd_canonical_name(const char *hostname)
Link Here
|
203 |
_Bool result; |
204 |
_Bool result; |
204 |
result = get_nameinfo(ai->ai_addr, ai->ai_addrlen, |
205 |
result = get_nameinfo(ai->ai_addr, ai->ai_addrlen, |
205 |
buf, (socklen_t)sizeof(buf)); |
206 |
buf, (socklen_t)sizeof(buf)); |
206 |
freeaddrinfo(ai); |
207 |
nfs_freeaddrinfo(ai); |
207 |
if (!result || buf[0] == '\0') |
208 |
if (!result || buf[0] == '\0') |
208 |
/* OK to use presentation address, |
209 |
/* OK to use presentation address, |
209 |
* if no reverse map exists */ |
210 |
* if no reverse map exists */ |
Lines 217-223
statd_canonical_name(const char *hostname)
Link Here
|
217 |
if (ai == NULL) |
218 |
if (ai == NULL) |
218 |
return NULL; |
219 |
return NULL; |
219 |
strcpy(buf, ai->ai_canonname); |
220 |
strcpy(buf, ai->ai_canonname); |
220 |
freeaddrinfo(ai); |
221 |
nfs_freeaddrinfo(ai); |
221 |
|
222 |
|
222 |
return strdup(buf); |
223 |
return strdup(buf); |
223 |
} |
224 |
} |
Lines 253-259
statd_canonical_list(const char *hostname)
Link Here
|
253 |
_Bool result; |
254 |
_Bool result; |
254 |
result = get_nameinfo(ai->ai_addr, ai->ai_addrlen, |
255 |
result = get_nameinfo(ai->ai_addr, ai->ai_addrlen, |
255 |
buf, (socklen_t)sizeof(buf)); |
256 |
buf, (socklen_t)sizeof(buf)); |
256 |
freeaddrinfo(ai); |
257 |
nfs_freeaddrinfo(ai); |
257 |
if (result) |
258 |
if (result) |
258 |
goto out; |
259 |
goto out; |
259 |
} |
260 |
} |
Lines 308-315
statd_matchhostname(const char *hostname1, const char *hostname2)
Link Here
|
308 |
} |
309 |
} |
309 |
|
310 |
|
310 |
out: |
311 |
out: |
311 |
freeaddrinfo(results2); |
312 |
nfs_freeaddrinfo(results2); |
312 |
freeaddrinfo(results1); |
313 |
nfs_freeaddrinfo(results1); |
313 |
|
314 |
|
314 |
xlog(D_CALL, "%s: hostnames %s and %s %s", __func__, |
315 |
xlog(D_CALL, "%s: hostnames %s and %s %s", __func__, |
315 |
hostname1, hostname2, |
316 |
hostname1, hostname2, |