Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/usr.sbin/rpc.lockd Pull up following revision(s) (request...
details: https://anonhg.NetBSD.org/src/rev/c2728834276f
branches: netbsd-6
changeset: 774252:c2728834276f
user: riz <riz%NetBSD.org@localhost>
date: Sun Jun 24 18:07:02 2012 +0000
description:
Pull up following revision(s) (requested by tron in ticket #354):
usr.sbin/rpc.lockd/lock_proc.c: revision 1.10
Fix broken IPv6 support. My Mac OS X Lion NFS client now happily
talks to my NetBSD 6.0_BETA2 NFS server over IPv6.
diffstat:
usr.sbin/rpc.lockd/lock_proc.c | 27 +++++++++++++++------------
1 files changed, 15 insertions(+), 12 deletions(-)
diffs (104 lines):
diff -r 0c1286b926ec -r c2728834276f usr.sbin/rpc.lockd/lock_proc.c
--- a/usr.sbin/rpc.lockd/lock_proc.c Sun Jun 24 18:04:37 2012 +0000
+++ b/usr.sbin/rpc.lockd/lock_proc.c Sun Jun 24 18:07:02 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock_proc.c,v 1.9 2007/11/04 23:12:50 christos Exp $ */
+/* $NetBSD: lock_proc.c,v 1.9.30.1 2012/06/24 18:07:02 riz Exp $ */
/*
* Copyright (c) 1995
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: lock_proc.c,v 1.9 2007/11/04 23:12:50 christos Exp $");
+__RCSID("$NetBSD: lock_proc.c,v 1.9.30.1 2012/06/24 18:07:02 riz Exp $");
#endif
#include <sys/param.h>
@@ -156,6 +156,7 @@
const char *netid;
struct netconfig *nconf;
char host[NI_MAXHOST];
+ int error;
(void)gettimeofday(&time_now, NULL);
@@ -194,9 +195,11 @@
* Need a host string for clnt_tp_create. Use NI_NUMERICHOST
* to avoid DNS lookups.
*/
- if (getnameinfo(host_addr, (socklen_t)host_addr->sa_len, host,
- sizeof(host), NULL, 0, NI_NUMERICHOST) != 0) {
- syslog(LOG_ERR, "unable to get name string for caller");
+ error = getnameinfo(host_addr, (socklen_t)host_addr->sa_len, host,
+ sizeof(host), NULL, 0, NI_NUMERICHOST);
+ if (error != 0) {
+ syslog(LOG_ERR, "unable to get name string for caller: %s",
+ gai_strerror(error));
return NULL;
}
@@ -482,7 +485,7 @@
result.cookie = arg->cookie;
result.stat.stat = getlock(&arg4, rqstp, LOCK_ASYNC | LOCK_MON);
transmit_result(NLM_LOCK_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -533,7 +536,7 @@
*/
result.stat.stat = unlock(&arg4, LOCK_CANCEL);
transmit_result(NLM_CANCEL_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -577,7 +580,7 @@
result.cookie = arg->cookie;
transmit_result(NLM_UNLOCK_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -625,7 +628,7 @@
result.cookie = arg->cookie;
result.stat.stat = nlm_granted;
transmit_result(NLM_GRANTED_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -907,7 +910,7 @@
result.stat.stat = (enum nlm4_stats)getlock(arg, rqstp,
LOCK_MON | LOCK_ASYNC | LOCK_V4);
transmit4_result(NLM4_LOCK_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -953,7 +956,7 @@
result.stat.stat = (enum nlm4_stats)unlock(&arg->alock,
LOCK_CANCEL | LOCK_V4);
transmit4_result(NLM4_CANCEL_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
@@ -991,7 +994,7 @@
result.cookie = arg->cookie;
transmit4_result(NLM4_UNLOCK_RES, &result,
- (struct sockaddr *)(void *)svc_getcaller(rqstp->rq_xprt));
+ (struct sockaddr *)svc_getrpccaller(rqstp->rq_xprt)->buf);
return NULL;
}
Home |
Main Index |
Thread Index |
Old Index