Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] nfsd: Fix message when creating NFSD listener sockets
@ 2015-10-31 10:29 Juergen Daubert
  2015-11-04 21:52 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Juergen Daubert @ 2015-10-31 10:29 UTC (permalink / raw)
  To: linux-nfs

When the kernel's IPv6 module isn't loaded:

#:~> /usr/sbin/rpc.nfsd --debug 8
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: -2 +3 +4
rpc.nfsd: Creating AF_INET TCP socket.
rpc.nfsd: Creating AF_INET UDP socket.
rpc.nfsd: Creating AF_INET6 TCP socket.
rpc.nfsd: Creating AF_INET6 UDP socket.

The last two messages are misleading, since creation of AF_INET6
sockets now fails silently without kernel IPv6 support.

Fixes: c31fef7f4beb ('nfsd: ignore unsupported address types')

Signed-off-by: Juergen Daubert <jue@jue.il>
---

 utils/nfsd/nfssvc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
index fc11d23..e8efd06 100644
--- a/utils/nfsd/nfssvc.c
+++ b/utils/nfsd/nfssvc.c
@@ -168,8 +168,6 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
 			continue;
 		}
 
-		xlog(D_GENERAL, "Creating %s %s socket.", family, proto);
-
 		/* open socket and prepare to hand it off to kernel */
 		sockfd = socket(addr->ai_family, addr->ai_socktype,
 				addr->ai_protocol);
@@ -183,6 +181,9 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
 			addr = addr->ai_next;
 			continue;
 		}
+
+		xlog(D_GENERAL, "Created %s %s socket.", family, proto);
+
 #ifdef IPV6_SUPPORTED
 		if (addr->ai_family == AF_INET6 &&
 		    setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on))) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsd: Fix message when creating NFSD listener sockets
  2015-10-31 10:29 [PATCH] nfsd: Fix message when creating NFSD listener sockets Juergen Daubert
@ 2015-11-04 21:52 ` Steve Dickson
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2015-11-04 21:52 UTC (permalink / raw)
  To: Juergen Daubert, linux-nfs



On 10/31/2015 06:29 AM, Juergen Daubert wrote:
> When the kernel's IPv6 module isn't loaded:
> 
> #:~> /usr/sbin/rpc.nfsd --debug 8
> rpc.nfsd: knfsd is currently down
> rpc.nfsd: Writing version string to kernel: -2 +3 +4
> rpc.nfsd: Creating AF_INET TCP socket.
> rpc.nfsd: Creating AF_INET UDP socket.
> rpc.nfsd: Creating AF_INET6 TCP socket.
> rpc.nfsd: Creating AF_INET6 UDP socket.
> 
> The last two messages are misleading, since creation of AF_INET6
> sockets now fails silently without kernel IPv6 support.
> 
> Fixes: c31fef7f4beb ('nfsd: ignore unsupported address types')
> 
> Signed-off-by: Juergen Daubert <jue@jue.il>
Committed... 

steved.

> ---
> 
>  utils/nfsd/nfssvc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c
> index fc11d23..e8efd06 100644
> --- a/utils/nfsd/nfssvc.c
> +++ b/utils/nfsd/nfssvc.c
> @@ -168,8 +168,6 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
>  			continue;
>  		}
>  
> -		xlog(D_GENERAL, "Creating %s %s socket.", family, proto);
> -
>  		/* open socket and prepare to hand it off to kernel */
>  		sockfd = socket(addr->ai_family, addr->ai_socktype,
>  				addr->ai_protocol);
> @@ -183,6 +181,9 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port)
>  			addr = addr->ai_next;
>  			continue;
>  		}
> +
> +		xlog(D_GENERAL, "Created %s %s socket.", family, proto);
> +
>  #ifdef IPV6_SUPPORTED
>  		if (addr->ai_family == AF_INET6 &&
>  		    setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on))) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-04 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-31 10:29 [PATCH] nfsd: Fix message when creating NFSD listener sockets Juergen Daubert
2015-11-04 21:52 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox