linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/4] mount: don't use IPPROTO_UDP for address resolution
Date: Wed, 17 May 2017 15:39:29 -0400	[thread overview]
Message-ID: <1495049969.10227.1.camel@redhat.com> (raw)
In-Reply-To: <1475834503-3984-2-git-send-email-stefanha@redhat.com>

On Fri, 2016-10-07 at 11:01 +0100, Stefan Hajnoczi wrote:
> Although getaddrinfo(3) with IPPROTO_UDP works fine for AF_INET and
> AF_INET6, the AF_VSOCK address family does not support IPPROTO_UDP and
> produces an error.
> 
> Drop IPPROTO_UDP and use the 0 default (TCP) which works for all address
> families.  Modern NFS uses TCP anyway so it's strange to specify UDP.
> 
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  utils/mount/stropts.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
> index d5dfb5e..ab2d37b 100644
> --- a/utils/mount/stropts.c
> +++ b/utils/mount/stropts.c
> @@ -885,9 +885,7 @@ static int nfs_try_mount(struct nfsmount_info *mi)
>  	int result = 0;
>  
>  	if (mi->address == NULL) {
> -		struct addrinfo hint = {
> -			.ai_protocol	= (int)IPPROTO_UDP,
> -		};
> +		struct addrinfo hint = {};
>  		int error;
>  		struct addrinfo *address;
>  

I think this is ok.

Reviewed-by: Jeff Layton <jlayton@redhat.com>

  reply	other threads:[~2017-05-17 19:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07 10:01 [PATCH 0/4] nfs-utils mount: add AF_VSOCK support Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 1/4] mount: don't use IPPROTO_UDP for address resolution Stefan Hajnoczi
2017-05-17 19:39   ` Jeff Layton [this message]
2016-10-07 10:01 ` [PATCH 2/4] mount: present AF_VSOCK addresses Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 3/4] mount: accept AF_VSOCK in nfs_verify_family() Stefan Hajnoczi
2016-10-07 10:01 ` [PATCH 4/4] getport: recognize "vsock" netid Stefan Hajnoczi
2017-01-03 16:37 ` [PATCH 0/4] nfs-utils mount: add AF_VSOCK support Steve Dickson
2017-01-04 13:31   ` Stefan Hajnoczi
2017-05-17 16:51 ` Jeff Layton
2017-05-18 12:48   ` Stefan Hajnoczi
2017-05-18 14:07     ` Jeff Layton
2017-05-22 12:12       ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1495049969.10227.1.camel@redhat.com \
    --to=jlayton@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).