From 5b0981f0868d4253b368e2aa1f71c74d7bf1dabc Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 9 Apr 2008 15:43:19 +0000 Subject: [PATCH] Fix a problem which stopped this from starting up on a kernel compiled without the INET6 option. --- sys/nlm/nlm_prot_impl.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c index a799414c7493..2b8982713e4d 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();