summaryrefslogtreecommitdiffstats
path: root/sys/nlm
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2008-04-09 15:43:19 +0000
committerdfr <dfr@FreeBSD.org>2008-04-09 15:43:19 +0000
commit59c9f770cb8293ea8f2c4072435f8a90b2070bdb (patch)
tree76a096f1cf31874f3646a063cbdd474ac876a47b /sys/nlm
parent7e6c3ca4e1840a590595c74b8eae7983dce531a5 (diff)
downloadFreeBSD-src-59c9f770cb8293ea8f2c4072435f8a90b2070bdb.zip
FreeBSD-src-59c9f770cb8293ea8f2c4072435f8a90b2070bdb.tar.gz
Fix a problem which stopped this from starting up on a kernel compiled
without the INET6 option.
Diffstat (limited to 'sys/nlm')
-rw-r--r--sys/nlm/nlm_prot_impl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c
index a799414..2b89827 100644
--- a/sys/nlm/nlm_prot_impl.c
+++ b/sys/nlm/nlm_prot_impl.c
@@ -1075,7 +1075,7 @@ nlm_server_main(int addr_count, char **addrs)
{
struct thread *td = curthread;
int error;
- SVCPOOL *pool;
+ SVCPOOL *pool = NULL;
struct sockopt opt;
int portlow;
#ifdef INET6
@@ -1137,7 +1137,7 @@ nlm_server_main(int addr_count, char **addrs)
#endif
memset(&sin, 0, sizeof(sin));
sin.sin_len = sizeof(sin);
- sin.sin_family = AF_INET6;
+ sin.sin_family = AF_INET;
sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
nlm_nsm = nlm_get_rpc((struct sockaddr *) &sin, SM_PROG,
SM_VERS);
@@ -1147,7 +1147,8 @@ nlm_server_main(int addr_count, char **addrs)
if (!nlm_nsm) {
printf("Can't start NLM - unable to contact NSM\n");
- return (EINVAL);
+ error = EINVAL;
+ goto out;
}
pool = svcpool_create();
OpenPOWER on IntegriCloud